Login to Correct SID [message #494604] |
Tue, 15 February 2011 23:48 |
muktha_22
Messages: 527 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 #494701 is a reply to message #494604] |
Wed, 16 February 2011 11:49 |
John Watson
Messages: 8938 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 |
|
LKBrwn_DBA
Messages: 487 Registered: July 2003 Location: WPB, FL
|
Senior Member |
|
|
muktha_22 wrote on Wed, 16 February 2011 03:18Hi
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
|
|
|
|
|