I had installed Oracle 12 to my Linux box. I tried to login using sqlplus but it prompt out this error at below. How to solve it?
Enter user-name: SYSDBA
Enter password: ERROR: ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3701
Additional information: 542678011
Process ID: 0 Session ID: 0 Serial number: 0
EDIT: How to find out default ORACLE_SID?
1 Answer 1
There could be various reason for this error.
ORACLE_SID
and ORACLE_HOME
.
When you have wrong ORACLE SID and HOME.
I could reproduce the error by changing my SID to something else. My SID is oracdb
.
[oracle@myserver ~]$ ps -ef | grep pmon
oracle 29336 1 0 Apr27 ? 00:00:22 ora_pmon_oracdb
But I changed it to orcl
.
[oracle@myserver Desktop]$ export ORACLE_SID=orcl
Then I tried to connect to the database using SQL*PLUS.
[oracle@myserver Desktop]$ sqlplus sys
SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:23:50 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3701
Additional information: -923528497
Process ID: 0
Session ID: 0 Serial number: 0
Then I changed it to original SID.
[oracle@myserver ~]$ export ORACLE_SID=oracdb
[oracle@myserver ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:28:40 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
When your instance is down and connected as a non-sys user
Use the following linux command to check whether some of the important background processes are running or not such PMON or SMON.
[oracle@myserver ~]$ ps -ef| grep pmon
oracle 57587 57044 2 00:52 pts/3 00:00:00 grep pmon
My oracle instance is down.
Now, as you have tried, I attempt to connect to the database using non-sys user, sysdba
is a privilege not a database user.
[oracle@myserver ~]$ sqlplus sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:53:04 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3701
Additional information: -688980181
Process ID: 0
Session ID: 0 Serial number: 0
Enter user-name:
I got the same error as you have got.
Now, connect as sysdba
/sysoper
and start the database instance.
[oracle@myserver ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:53:36 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
-
How to find out my default ORACLE_SID?Ivan– Ivan2017年05月02日 07:50:47 +00:00Commented May 2, 2017 at 7:50
-
You can go to
$ORACLE_HOME/dbs
directory and find initialization parameter files such asspfile<SID>.ora
orinit<SID>.ora
.atokpas– atokpas2017年05月02日 07:54:34 +00:00Commented May 2, 2017 at 7:54 -
@peterwkc: Or if your instance is up and running then
$ ps -ef | grep pmon
shows instance name at the end of the process name.atokpas– atokpas2017年05月02日 08:07:52 +00:00Commented May 2, 2017 at 8:07 -
@peterwkc, For linux & Solaris , you can also find ORACLE_SID from "pgrep -lf pmon" . And In linux you can also find from this query" select distinct sid from v$mystat;"Md Haidar Ali Khan– Md Haidar Ali Khan2017年05月02日 08:29:48 +00:00Commented May 2, 2017 at 8:29
-
I"m issue this command ps -ef | grep pmon root 31688 30893 0 19:19 pts/0 00:00:00 grep --color=auto pmon. Is my oracle instance is up? How to start the oracle instance?Ivan– Ivan2017年05月02日 11:19:57 +00:00Commented May 2, 2017 at 11:19