1752572 Members
4615 Online
108788 Solutions
New Discussion юеВ

sqlplus

 
Cathy Arora
Frequent Advisor

sqlplus

Hi all;
I am logged on hp-unix 11:00 box and trying to
log to sqlplus. I have exports in my .profile
for ORACLE_SID ,CLASSPATH LD_LIBRARY_PATH etc
and proper Path etc
but when I type my in sqlplus id I get an error message

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
HP-UX Error: 2: No such file or directory
Any clue what could nbe happeing.
Thanks for help.
raj
6 REPLIES 6
Vijaya Kumar_3
Respected Contributor

Re: sqlplus

i think your database is not available OR you are working with a wrong ORACLE_HOME directory.
To check your database, do a

ps -ef | grep pmon

and see your database listed.
Also check your oracle installation path. there may be multiple directories.
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Graham Cameron_1
Honored Contributor

Re: sqlplus

The error says it all.
Oracle not available.

Is the box you are logged into the same box that runs the database?

If so, check your sid (echo $ORACLE_SID), and ask the DBA ti check the database for that SID.

If not, you need to specify a database location to sqlplus (eg sqlplus myid@database)

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Cathy Arora
Frequent Advisor

Re: sqlplus

Thanks to try to help
oracle sid is OK. pmon is running. database is up.
is it possible that id is wrong?
raj
Michael Schulte zur Sur
Honored Contributor

Re: sqlplus

Can you give us the output of:
set | grep -i ora
and check the alertfile, whether oracle has any problems since last startup.
Do you just execute sqlplus and then type user/password?

Michael
Paddy_1
Valued Contributor

Re: sqlplus

Doc ID:
Note:122183.1
Subject:
ORA-27101 "Shared Memory Realm Does Not
Exist" Connecting Via Net8
Type:
PROBLEM
Status:
REVIEWED

Content Type:
TEXT/PLAIN
Creation Date:
17-OCT-2000
Last Revision Date:
29-DEC-2000
Language:
USAENG



*************************************************************
This article is being delivered in Draft form and may contain
errors. Please use the MetaLink "Feedback" button to advise
Oracle of any issues related to this article.
*************************************************************

Problem Description
-------------------

You are attempting a client connection to an 8i database via
sqlplus and receive the following errors:

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory

You have installed 8.1.7 on the same server in a seperate
ORACLE_HOME.

Solution Description
--------------------

1) For local (BEQ) connections:

Verify that ORACLE_SID is set and points to a valid 8.1.7
database which is up and running.

% echo $ORACLE_SID
junk

% ps -ef |grep smon
oracle 24603 1 0 15:22:51 ? 0:02 ora_smon_JUNK

In this scenario, as ORACLE_SID is case-sensitive on the Unix
platform, a database called 'junk' isn't running. The fix would
be to set ORACLE_SID correctly or to the valid instance.

% setenv ORACLE_SID JUNK

2) For remote (TCP/listener) connections:

Review the listener.ora currently used to startup the listener
and verify the ORACLE_HOME is correct for all listed 8i
databases.

If the ORACLE_HOME points to the 8.1.7 software yet the database
was created with 8.1.6 or 8.1.5, then this error can occur.


Explanation
-----------

Previously when the ORACLE_HOME or ORACLE_SID was set incorrectly,
in the 'oracle' or client user's environment, only ora-1034 was reported.

ORA-01034 "ORACLE not available"

With 8.1.7, the ora-27101 is reporting that the shared memory
key generated by the client doesn't match any currently
existing keys. This is to be expected if the ORACLE_HOME used by
the client isn't the same as the one used to startup the database
with or the ORACLE_SID is not correctly referencing the right
instance.


Additional Search Words
-----------------------

listener, tnslsnr, parameter, hashing algorithm, attach, SGA
The sufficiency of my merit is to know that my merit is NOT sufficient
Hein van den Heuvel
Honored Contributor

Re: sqlplus


The shared memory id is calculated as a hash from ORACLE_HOME and ORACLE_SID. Maybe you listener.ora / tnsnames.ora do not match the environment used to start the DB?

If you can't figure it out from there, then also check that oracle has setuid (+s)

ls -l $ORACLE_HOME/bin/oracle:
-rwsr-sr-x ... oracle

chmod 7755 $ORACLE_HOME/bin/oracle

hth,
Hein.