Home » Infrastructure » Unix » Login to Correct SID (Unix - oracle 10.2.0.1.0)
Login to Correct SID [message #494604] Tue, 15 February 2011 23:48 Go to next message
muktha_22
Messages: 407
Registered: December 2009
Senior Member
Hi All,

I had created a DB called orcl2.
Created through DBCA utiliy.

Now when i am trying to get in, it takes me into the existing DB - orcl

-----------------------------------------------------------------
[oracle@Oracle10g ~]$ set oracle_sid=orcl2
[oracle@Oracle10g ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 16 16:45:05 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 96470608 bytes
Database Buffers 184549376 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
orcl
-----------------------------------------------------------------

please help me out on this.

Regards:
Muktha
Re: Login to Correct SID [message #494615 is a reply to message #494604] Wed, 16 February 2011 01:09 Go to previous messageGo to next message
Michel Cadot
Messages: 59750
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no relation between ORACLE_SID and INSTANCE_NAME.
There is no problem.

Regards
Michel
Re: Login to Correct SID [message #494628 is a reply to message #494615] Wed, 16 February 2011 02:18 Go to previous messageGo to next message
muktha_22
Messages: 407
Registered: December 2009
Senior Member
Hi Michel,

Thanks for your input.

please let me know. What could be the solution....

Regards:
Muktha
Re: Login to Correct SID [message #494634 is a reply to message #494628] Wed, 16 February 2011 02:39 Go to previous messageGo to next message
Michel Cadot
Messages: 59750
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The solution to what? I don't see any problem.

Regards
Michel
Re: Login to Correct SID [message #494655 is a reply to message #494634] Wed, 16 February 2011 05:57 Go to previous messageGo to next message
muktha_22
Messages: 407
Registered: December 2009
Senior Member
Hi Michel,

Then how to get into the correct DB?

I used the below steps:
ORACLE_SID=ORCL2
SQLPLUS /NOLOG
CONN /AS SYSDBA

regards:
Muktha
Re: Login to Correct SID [message #494659 is a reply to message #494655] Wed, 16 February 2011 06:29 Go to previous messageGo to next message
Michel Cadot
Messages: 59750
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You are in the correct db, the one you started with SID ORCL2.

Regards
Michel
Re: Login to Correct SID [message #494701 is a reply to message #494604] Wed, 16 February 2011 11:49 Go to previous messageGo to next message
John Watson
Messages: 4793
Registered: January 2010
Location: Global Village
Senior Member
you are setting the ORACLE_SID variable, but you are not exporting it. So the new value isn't visible to sqlplus. You should research these Unix commands:

set
env
export

And of course it is all described in the Administrator's Redference foir UNIX based Operating Systems.

Re: Login to Correct SID [message #494702 is a reply to message #494628] Wed, 16 February 2011 11:56 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 446
Registered: July 2003
Location: WPB, FL
Senior Member
muktha_22 wrote on Wed, 16 February 2011 03:18
Hi
please let me know. What could be the solution....


Best way to set the environment is this:
$ export ORACLE_SID=ORCL2
$ ORAENV_ASK=NO
$ . /usr/local/bin/oraenv

PS: These are for ksh and bash shells, but would be similar for sh shell.


[Updated on: Wed, 16 February 2011 12:03] by Moderator

Report message to a moderator

Re: Login to Correct SID [message #495356 is a reply to message #494702] Fri, 18 February 2011 06:56 Go to previous messageGo to next message
muktha_22
Messages: 407
Registered: December 2009
Senior Member
Hi All,

Thanks a lot.....
Re: Login to Correct SID [message #495357 is a reply to message #495356] Fri, 18 February 2011 06:59 Go to previous message
Michel Cadot
Messages: 59750
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Does this mean you solved your issue? What were the problem and solution?

Regards
Michel

[Updated on: Fri, 18 February 2011 07:00]

Report message to a moderator

Previous Topic: No of DB exist
Next Topic: Migrating to OS X
Goto Forum:
  


Current Time: Sun Nov 23 10:30:28 CST 2014

Total time taken to generate the page: 0.05042 seconds