ORA-01034: ORACLE not available ORA-27101: shared

2019-01-16 10:24发布

I am getting the above error when trying to connect to a server database from a client using service name orcl. It is getting connected when I am using the other service name i.e. dms

Below is my listener.ora

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = dms)
      (SERVICE_NAME = dms)
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
#      (PROGRAM = extproc)
    )
  (SID_DESC =
     (SID_NAME = orcl)
     (SERVICE_NAME = dms)
    # (GLOBAL_DBANME = orcl)
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
   #  (PROGRAM = extproc)
  )
  )


LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.53)(PORT = 1521))

    )
  )

ADR_BASE_LISTENER = /home/oracle/app/oracle
and tnsnames.ora
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.53)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
     #(SERVICE_NAME = orcl.localdomain)
      (ORACLE_SID = dms)
      (SERVICE_NAME = orcl)
    )
  )

DMS =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.53)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dms)
      (ORACLE_SID = dms)
    )
  )

Please tell me what to do?

11条回答
干净又极端
2楼-- · 2019-01-16 10:46

Make sure that your ORACLE_HOME and ORACLE_SID are correct To see the current values in windows, at the command prompt type

echo %ORACLE_HOME%

Then

echo %ORACLE_SID%

If the values are not your current oracle home and SID you need to correct them. This can be done in Windows environment variables.

Check out this page for more info

查看更多
来,给爷笑一个
3楼-- · 2019-01-16 10:48

This same error occurred to me even though the ORACLE_HOME and ORACLE_SID seemed to be correctly set up.

The problem was in ORACLE_HOME, which is not supposed to end with a slash character. When I removed the ending slash, it started to work properly.

## WRONG !!!
export ORACLE_HOME=/usr/local/oracle/11gR2/

## CORRECT
export ORACLE_HOME=/usr/local/oracle/11gR2

So, even if it seems everything is configured fine, check your variables for this.

查看更多
Fickle 薄情
4楼-- · 2019-01-16 10:49

Had the same issue on windows XP. Resolved. The error was caused due to the system log being full. Control Panel -> Administrative Tools -> Event viewer Right click on application log, clear all events, optionaly save the log. Same process for system log. Restart and it should work.

查看更多
Melony?
5楼-- · 2019-01-16 10:49
SQL> sqlplus "/ as sysdba"
SQL>startup
Oracle instance started
------
Database mounted.
Database opened.
Quit
[oracle@hcis ~]$ lsnrctl start
查看更多
贪生不怕死
6楼-- · 2019-01-16 10:52

Open command prompt and execute the below commands:

set oracle_sid=DATABASE NAME
sqlplus /nolog
conn sys/sys as sysdba
shutdown abort
startup
查看更多
Summer. ? 凉城
7楼-- · 2019-01-16 10:57

ORA-01034 and ORA-27101 normally indicate that the database instance you're attempting to connect to is shut down and that you're not connected as a user who has permission to start it up. Log on to the server 192.168.1.53 and start up the orcl instance, or ask your DBA to do this for you.

查看更多
登录 后发表回答