• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 662
  • Last Modified:

Log in sys as sysdba

Why am I getting an idle instance when I login as sys as sysdba?
I don't get an idle instance when I log in as sysyem.
0
lium1
Asked:
lium1
  • 5
  • 5
1 Solution
 
slightwv (䄆 Netminder) Commented:
The message indicates the instance isn't running.

I'm not sure why system doesn't produce the idle instance message but I figure it will generate a message if you try to execute any command.
0
 
lium1Author Commented:
I log in as system and do some query and it works. What do you mean by removed Unix OS Zone? When I do ps -ef | grep pmon, what message that I should be looking to make sure instances are running okay?
0
 
slightwv (䄆 Netminder) Commented:
>>I log in as system and do some query and it works.

Then when you are connecting as SYSDBA, you aren't connecting to the same instance or the database isn't in an 'open' state.

Make sure your ORACLE_HOME is set properly.

>>When I do ps -ef | grep pmon, what message that I should be looking to make sure instances are running okay?

All that ps command does is make sure the pmon Oracle process is running.  This is just an indication the database is running.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
lium1Author Commented:
How do I make sue ORACLE_HOME is set properly, in Unix?
Do I have to say set or export?
If you could, please exact syntax?

Thanks in advance!
0
 
slightwv (䄆 Netminder) Commented:
Sorry ORACLE_HOME was a typo.  I meant ORACLE_SID.

Yes, export of variables is correct:
export ORACLE_SID=ORCL

Where ORCL is the database SID you are trying to connect to.
0
 
lium1Author Commented:
Thanks, but when I do grep ORACLE_SID, it shows all pmon, smon, and background processes.
So, do I still need to export ORACLE_SID?
0
 
slightwv (䄆 Netminder) Commented:
We are getting way off topic here.

ORACLE_SID is just an environment variable that tells Oracle tools and utilities what instance it should try to connect to.

The message about the idle instance means:  The instance is down or not fully opened or you are trying to connect to an instance that doesn't exist.

For example if your instance name is ORCL and ORACLE_SID is set to BILL:
export ORACLE_SID=BILL

If you try to connect as sys, you will likely get an idle instance message.
0
 
lium1Author Commented:
ORACLE_SID=ORCL is already set as environment variable in .cshr file. When I login as sys as sysdba/password@databasename, I am getting an idle instance message. What exactly that I need to resolve it?
0
 
slightwv (䄆 Netminder) Commented:
>>When I login as sys as sysdba/password@databasename, I am getting an idle instance message

The @databasename is telling oracle to connect to a different database than the one set in ORACLE_SID.  Which database depends on what is set in $ORACLE_HOME/network/admin/tnsnames.ora and the databasename entry.
0
 
lium1Author Commented:
I think the problem is solved by source .cshrc.
Thanks for your help any way, and I will give all credits to you.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now