ORA-27101 Shared memory realm does not exist錯誤解決方案
一. 問題描述
在一次資料庫災難恢復過程中,資料庫恢復到一個新的環境裡,並且資料庫已經成功啟動了,可以在伺服器上登入與訪問。但客戶端在訪問時卻報了ORA-27101的錯誤,無法透過定義資料庫連線串遠端連線到這個資料庫。在資料庫伺服器上,定義一個訪問本地資料庫的連線串,使用這個連線串連線也報同樣的錯誤。
錯誤的現象與現場如下:
$export ORACLE_SID=Port
本地可以使用管理員登入,資料庫為open狀態
[@more@]$sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Fri Feb 18 09:44:01 2011
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE
伺服器與客戶端的連線串定義如下:
$more $ORACLE_HOME/network/admin/tnsnames.ora
。。。。。。
port =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =10.192.215.77 )(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = port)
)
)
透過tnsping命令測試連線,伺服器和客戶端都是正常的,如下:
$ tnsping port
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =10.192.215.77)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = port)))
OK (90 msec)
透過sqlplus進行遠端登入,報下面的錯誤:
$ sqlplus user1/pwd1@port
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
IBM AIX RISC System/6000 Error: 2: No such file or directory
Enter user-name:
二. 問題分析
首先檢查資料庫伺服器的檔案系統的操作許可權,發現沒有問題;
接著檢查伺服器的網路狀況,也沒有發現問題;
在ORACLE METALINK 網站上找到一遍文章,ID=122183.1,在該文中提到了listener.ora檔案中,SID_NAME是大小寫敏感的,如下:
Database Connections Fail With ORA-27101 Shared Memory Realm Does Not Exist [ID 122183.1]
For remote (TCP/listener) connections:
- Review the listener.ora currently used to startup the listener and verify the ORACLE_HOME value is correct for all listed Oracle databases. If the ORACLE_HOME points to a different Oracle version then what was used when the database was created, then this error can occur.
- Likewise, review the listener.ora currently used to startup the listener and verify the SID_NAME value is correct and has the right value (the SID_NAME is case sensitive).
檢查資料庫伺服器的LISTENER.ORA檔案,發現SID_NAME大小寫書寫錯誤了.
$more $ORACLE_HOME/network/admin/listener.ora
SID_LIST_LISTENER=
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = PORT)
(SID_NAME = PORT)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.192.215.77)(PORT =1522))
)
而資料庫的例項名稱為Port,透過查詢系統程式的名稱可以確認
$ps -ef|grep ora
。。。。。。
oracle 192612 1 0 Dec 09 - 16:12 ora_cjq0_Port
oracle 221436 1 0 Dec 09 - 13:55 ora_pmon_Port
oracle 286956 1 0 Dec 09 - 7:41 ora_mman_Port
oracle 299190 1 0 Dec 09 - 15:24 ora_mmon_Port
到此找到了問題的根源,原來是資料庫監聽配置檔案的內容配置不當(SID_NAME沒有注意大小寫),導致了透過定義資料庫連線串無法遠端訪問資料庫的故障
三. 問題解決
修改監聽器配置檔案,內容修改如下:
$more $ORACLE_HOME/network/admin/listener.ora
SID_LIST_LISTENER=
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = Port)
(SID_NAME = Port)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.192.215.77)(PORT =1522))
)
重新啟動監聽器,如下:
$lsnrctl start listener
在伺服器與客戶端進行資料庫連線,可以成功登入了,如下:
$ sqlplus user1/pwd1@port
SQL*Plus: Release 10.2.0.3.0 - Production on Fri Feb 18 09:44:01 2011
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
問題等到解決,筆者重新查閱了ORACLE 的HELP 文件,在network相關的章節,找不到SID_NAME 需要注意大小寫的說明,只能在METALINK文件中可以查到相關的說明。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/32980/viewspace-1046168/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 出了ORA-27101: shared memory realm does not exist 錯誤的處理
- ORA-03113: 通訊通道的檔案結尾(錯誤解決);ORA-27101: shared memory realm does not exist
- ORA-27100 shared memory realm already exists錯誤解決
- ora-27100:shared memory realm already exists錯誤的解決
- The operation, ‘DecodeJpeg/contents‘, does not exist in the graph.錯誤解決方法
- The file '/MasterPage.master' does not exist. 類錯誤解決方法AST
- Ubuntu Cannot allocate memory 錯誤解決方案Ubuntu
- o2cb_ctl: Cluster "ocfs2" does not exist 錯誤解決
- ORA-27100: shared memory realm already exists解決方法
- The user specified as a definer ('wx_root'@'%') does not exist 解決方案
- expdp ORA-31626: job does not exist 解決方案
- Oracle ORA - 01720 grant option does not exist for..報錯解決Oracle
- Oracle ORA-27101錯誤及解決辦法Oracle
- Error: The directory named as part of the path ./log/supervisord.log does not exist解決方案Error
- `QtValidLicenseForCoreModule' does not name a type 錯誤的解決QTREM
- ORA-24756: transaction does not exist問題解決
- oracle10g啟動錯誤ORA-27101解決Oracle
- latex 錯誤以及解決方案
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解決方法MySql
- 模擬ORA-04043並解決(dba_* does not exist)
- shared_pool——解決ORA-4031錯誤
- asmcmd does not exist in directoryASM
- Allowed memory size of 134217728 bytes 錯誤解決心得
- Linux下錯誤解決方案Linux
- ORA-28000錯誤解決方案
- ORA-07445: 錯誤解決方案
- ORA-00054錯誤解決方案(摘)
- javax.media does not existJava
- 關於Allowed memory size of (PHP記憶體溢位)錯誤的可能原因及解決方案PHP記憶體溢位
- oninit -vy 出錯: Fatal error in shared memory creation 以及 shared memory already existsError
- 安裝kernel...src.rpm錯誤:warning: user mockbuild does not exist - using rootMockUI
- 解決MySQL server has gone away錯誤的解決方案MySqlServerGo
- Android解決The APK file app-debug.apk does not exist on disk.AndroidAPKAPP
- Hadoop常見錯誤及解決方案Hadoop
- HTTP 錯誤 500.21 - Internal Server Error 解決方案HTTPServerError
- MySQL插入資料1366錯誤解決方案MySql
- 開發常見錯誤及解決方案
- MySQL錯誤Incorrect file format解決方案薦MySqlORM