Connecting to Oracle Database

Lifecycle development
I have created two databases on the machine which are identified by two SID when i see in the 'Servies' under win2K. My question is when i connect to the user (present in both databases) using SQL*Plus without specifying the host string (working on database server) which database it should connect? What if the databases r under Unix env? Please explain !

Answer Wiki

Thanks. We'll let you know when a new response is added.

Go to the URL below(*) and search for the chapter “Updating ORACLE_SID in the Registry”. It explains how to set a default Oracle database under Windows OS.

Don’t know how to do it under Unix. I advise you to perform a search over the OTN website.

(*) possibly you will be asked to log-on to Oracle’s OTN website – if you don’t have an account yet, create one as OTN is a repository of valuable info about Oracle.

Discuss This Question: 3  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Sharad
    Thanks a lot !
    0 pointsBadges:
  • PeterMac
    Re Unix not quite sure what your question is, so... To set SID for client process in Unix it is just a standard environment variable ORACLE_SID=mySID export ORACLE_SID If you are connecting to remote database, Oracle server connectivity is pretty much the same wherever the server is running, Windows, Unix, or anything else. So only really matters where your client process resides, and how you set SID in the client environment.
    15 pointsBadges:
  • Oteropa
    Updating ORACLE_SID in the Registry If this is the first database on the system or if you intend to make the new database the default database, then you must make a change in the registry. Start Registry Editor at the command prompt: C:> regedt32 The Registry Editor window appears. Choose subkey HKEY_LOCAL_MACHINESOFTWAREORACLEHOME0 for the first Oracle home on your computer. For subsequent installations to different Oracle homes on the same computer, the path is HKEY_LOCAL_MACHINESOFTWAREORACLEHOMEID where ID is the unique number identifying the Oracle home. See Also: "Configuration Parameters and the Registry" in Oracle9i Database Getting Started for Windows for more information on subkey locations for multiple Oracle homes Locate parameter ORACLE_SID on the right side of the Registry Editor window. Double-click the parameter name and change the data to the new SID, which is prod in this example. If you do not yet have parameter ORACLE_SID, because this is the first database on your system, then you must create it. To create parameter ORACLE_SID: Choose Add Value from the Edit menu. The Add Value dialog box appears: Text description of the illustration addvalue.gif Enter ORACLE_SID in the Value Name text box. Select REG_EXPAND_SZ (for an expandable string) in the Data Type list box. Click OK. A string editor dialog box appropriate for the data type appears: Text description of the illustration stringre.gif Enter prod in the String Editor dialog box. Click OK. Registry Editor adds parameter ORACLE_SID. Choose Exit from the Registry menu. Registry Editor exits. Backing Up the New Database -------------------------------------------------------------------------------- Caution: If anything goes wrong while operating the new database without a backup, then you must repeat the database creation procedure. Back up your database now to prevent loss of data. -------------------------------------------------------------------------------- To back up the new database: Shut down the database instance and stop the service: C:> oradim -SHUTDOWN -SID prod -USRPWD password -SHUTTYPE srvc,inst -SHUTMODE i
    0 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: