ORA-01034: ORACLE not available

listeneroracle

I tried to start the listener and do a dbstart, but it looks like it is still saying "Oracle Not available". Maybe the dbstart didn't work. Any suggestions would help me.

[user@fedora16 bin]$ echo $ORACLE_HOME
/home/user/app/user/product/11.2.0/dbhome_1
[user@fedora16 bin]$ echo $ORACLE_SID
orcl
[user@fedora16 bin]$ cat $ORACLE_HOME/network/admin/listener.ora 
# listener.ora Network Configuration File: /home/user/app/user/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

orcl =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /home/user/app/user/product/11.2.0

[user@fedora16 bin]$ cat $ORACLE_HOME/network/admin/sqlnet.ora 
# sqlnet.ora Network Configuration File: /home/user/app/user/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

ADR_BASE = /home/user/app/user/product/11.2.0

[user@fedora16 bin]$ dbstart $ORACLE_HOME
[user@fedora16 ~]$ lsnrctl start orcl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 04-MAR-2012 09:04:19

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /home/user/app/user/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /home/user/app/user/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/user/app/user/product/11.2.0/diag/tnslsnr/fedora16/orcl/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     orcl
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                04-MAR-2012 09:04:19
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/user/app/user/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/user/app/user/product/11.2.0/diag/tnslsnr/fedora16/orcl/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
The listener supports no services
The command completed successfully

[user@fedora16 bin]$ ps -ef | grep  '\(ora\|smon\|lsnr\)'
user  2405     1  0 08:46 ?        00:00:00 /home/user/app/user/product/11.2.0/dbhome_1/bin/tnslsnr orcl -inherit
user  2553  1611  0 08:49 pts/0    00:00:00 grep --color=auto \(ora\|smon\|lsnr\)

[user@fedora16 bin]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Sun Mar 4 08:46:29 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: scott
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
Process ID: 0
Session ID: 0 Serial number: 0

Best Answer

dbstart will only start databases that have the third parameter in the oratab file set to Y. Check the value in that file.

You also don't need to pass the ORACLE_HOME as an argument; not sure if you actually meant to pass the SID, but anyway, the home is taken from the oratab too.

The script itself says that it should only be executed as part of the system boot procedure, e.g. from a script run during boot from an /etc/rc*.d directory. The $ORACLE_HOME parameter that's passed in is only used to start the listener; the home for each database is taken from oratab.

According to the documentation, dbstart is deprecated in favour of Oracle Restart (in non-RAC environments) in 11g Release 2; I guess that means you should use crsctl start has to start the listener and database from then. That also uses the third oratab value to decide whether to start the database.