Solved

Log in sys as sysdba

Posted on 2013-05-20
12
640 Views
Last Modified: 2013-05-20
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
Comment
Question by:lium1
  • 5
  • 5
12 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39181532
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
 

Author Comment

by:lium1
ID: 39181591
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
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39181616
>>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
 

Author Comment

by:lium1
ID: 39181633
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
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39181650
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:lium1
ID: 39181738
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
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39181900
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
 

Author Comment

by:lium1
ID: 39181937
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
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 39181960
>>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
 

Author Comment

by:lium1
ID: 39182023
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
oracle query help 18 99
help on oracle query 5 33
Oracle 12c database link between pdb not working 20 42
Distinct values from all columns in a table?? PL SQL 4 23
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now