Home » RDBMS Server » Server Administration » Error Logging into Oracle Database
Error Logging into Oracle Database [message #195799] Mon, 02 October 2006 09:01 Go to next message
jilsoke
Messages: 1
Registered: October 2006
Junior Member
I have Four Oracle 9i Instances running in a hp machine. When I log in as system/password@SID, it wrks fine but when I log in as system/password without sepicifying SID, I get the error 'Oracle not available'. Please help me resolve this error, Or How can I set one Instance to be the default. I have tried $ORACLE_SID=SID but this does not work.
Thanks
Julius Okello
Re: Error Logging into Oracle Database [message #195802 is a reply to message #195799] Mon, 02 October 2006 09:15 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
See http://www.orafaq.com/faq/how_does_one_prepare_the_oracle_environment
Re: Error Logging into Oracle Database [message #196273 is a reply to message #195799] Wed, 04 October 2006 13:12 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

try this ways
first set oracle-sid variable
cmd> set oracle_sid=db02
cmd>sqlplus "system/manager"
Re: Error Logging into Oracle Database [message #196599 is a reply to message #195799] Fri, 06 October 2006 02:31 Go to previous messageGo to next message
bwetkstr
Messages: 114
Registered: August 2005
Senior Member
just a test:

set your oracle sid and then echo the oracle_sid variable.

windows:
set ORACLE_SID=db
echo %ORACLE_SID%


linux
export ORACLE_SID=db
echo $ORACLE_SID

Or in Linux you can also set your oracle enviroment
> . oraenv
> db
> sqlplus '/ as sysdba' (if you are the right os user that is)
Re: Error Logging into Oracle Database [message #196758 is a reply to message #195799] Sat, 07 October 2006 01:16 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

How can I set one Instance to be the default.
set or system enviourment variable for oracle_sid.
get the error 'Oracle not available'.
when u got above error it mean one of instance is shutdown.
try just try this way
sql>system/manager
oracle not found.
sql> sys as sysdba
password : ******
connected
sql>startup
Re: Error Logging into Oracle Database [message #198052 is a reply to message #196758] Sat, 14 October 2006 02:54 Go to previous message
pareshjavkar
Messages: 7
Registered: October 2006
Location: Mumbai
Junior Member

In Windows:

cmd> set oracle_sid=db01
cmd> sqlplus /nolog
SQL> conn username/password

(Also, you can set one instance to default:

1. Right CLick on MyComputer
2. Select Advanced Tab
3. Select Environment_Variables Tab
4. User Variables for Administration
5. Click New
6. Add oracle_sid in variable window and db01 (sid name) in Value window)

In Linux:

$ export ORACLE_SID=db01
$ sqlplus /nolog
SQL> conn username/password

(Also, you can hardcore the changes in .bash_profile present for oracle user for setting the environment
Just Add "export ORACLE_SID=db01" in your .bash_profile)
Previous Topic: ORA-12154: TNS:could not resolve the connect identifier specified
Next Topic: Statspack Scheduling
Goto Forum:
  


Current Time: Sun Dec 04 04:25:24 CST 2016

Total time taken to generate the page: 0.10457 seconds