Home » Infrastructure » Linux » Connect to Idle instance (11g)
Connect to Idle instance [message #467889] Wed, 28 July 2010 01:41 Go to next message
malhi
Messages: 96
Registered: December 2009
Location: Karachi
Member
I have installed Oracle 11.2 on a server, i am facing this error
when i login with sqlplus / as sysdba it connects to idle instance. When i connect with sqlplus sys/pwd as sysdba then no such message appear. What should i do.
Re: Connect to Idle instance [message #467890 is a reply to message #467889] Wed, 28 July 2010 02:13 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Execute and post (copy and paste your sqlplus session) the result of the following commands for both connection:
select instance_name, status from v$instance;
select name, open_mode from v$database;

Regards
Michel
Re: Connect to Idle instance [message #467894 is a reply to message #467890] Wed, 28 July 2010 02:39 Go to previous messageGo to next message
malhi
Messages: 96
Registered: December 2009
Location: Karachi
Member
Following is the output when i login as sqlplus sys/pwd@sid as sysdba

SQL> select instance_name,status from v$instance;

INSTANCE_NAME STATUS
---------------- ------------
scba OPEN

SQL> select name,open_mode from v$database;

NAME OPEN_MODE
--------- --------------------
SCBA READ WRITE

In first scenario when Idle Instance message received if i give any of command ORA-01034 appears
Re: Connect to Idle instance [message #467895 is a reply to message #467894] Wed, 28 July 2010 02:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So you are not connected to the same database.
Post "env|sort"

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.

Note that you execute:
sqlplus sys/pwd@sid as sysdba

When you said in the previous post it was:
sqlplus sys/pwd as sysdba

They are 2 DIFFERENT things.

Regards
Michel

[Updated on: Wed, 28 July 2010 02:42]

Report message to a moderator

Re: Connect to Idle instance [message #467984 is a reply to message #467895] Wed, 28 July 2010 07:15 Go to previous messageGo to next message
malhi
Messages: 96
Registered: December 2009
Location: Karachi
Member
I am re-explaining my problem

I have installed oracle11gr2. When i start the database with the "dbstart" command and logon as "sqlplus / as sysdba" it always connected to an idle instance while the database is up and runing and i am also able to login via SqlDeveloper on Client machine with other created users.

However if i stop the database and start the database again with

sqlplus /nolog
conn / as sysdba
startup

then

i am able to connect successfully with "sqlplus / as sysdba"

It seems that dbstart command starting the database in such a way that it does not allow internal connection as after starting the database if i logon as "sys/pwd@tns[/email] as sysdba" then it connects to database successfully. Can somebody explain why i am not able to login as "sqlplus / as sysdba" when starting the database with "dbstart" command.

Thanks and appreciated


Output of env | sort is

EMHOSTNAME=mehran
HOME=/home/oracle/
HOSTNAME=mehran
JAVA_HOME=/usr/lib/jvm/java-6-sun
LANG=en_US.UTF-8
LD_LIBRARY_PATH=:/opt/oracle/product//lib:/opt/oracle/product//lib32:/usr/lib/jvm/java-6-sun/lib
LOGNAME=oracle
MAIL=/var/mail/oracle
NLS_LANG=.WE8MSWIN1252
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/
ORACLE_HOSTNAME=mehran
ORACLE_SID=scba
ORA_HOME=/opt/oracle/product/
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/oracle/product//bin:/usr/lib/jvm/java-6-sun/bin:/op t/glassfish/bin
PWD=/home/oracle/
SHELL=/bin/bash
SHLVL=1
SSH_CLIENT=172.16.100.34 42070 22
SSH_CONNECTION=172.16.100.34 42070 172.16.0.14 22
SSH_TTY=/dev/pts/0
TERM=xterm
USER=oracle
_=/usr/bin/env
XDG_SESSION_COOKIE=7d6933398ba5b939da377c6f4a3cd71f-1280319054.411717-1210427211

[Updated on: Wed, 28 July 2010 07:19]

Report message to a moderator

Re: Connect to Idle instance [message #467994 is a reply to message #467984] Wed, 28 July 2010 08:24 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I am re-explaining your problem:
"sqlplus / as sydba" connects to your local database define by the variable ORACLE_SID.
"sqlplus sys/psw@tns[/email] as sysdba" connects to the database defined by the service name "tns".

Quote:
So you are not connected to the same database.


Regards
Michel

[Updated on: Wed, 28 July 2010 08:24]

Report message to a moderator

Previous Topic: Oracle files are deleted each time I restart OS
Next Topic: cluster verification script
Goto Forum:
  


Current Time: Fri Mar 29 04:21:08 CDT 2024