dbsnmp啟動失敗解決方法

space6212發表於2019-06-13

今天檢視兩個新裝的庫的程式,發現有很多dbsnmp相關的程式。


oracle 20368 20365 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20369 20368 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20370 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20374 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20375 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20376 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20377 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20378 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20379 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20380 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20381 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20382 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20383 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20384 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20385 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20386 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp
oracle 20387 20369 0 Apr05 pts/3 00:00:00 /opt/oracle/product/9.2/bin/dbsnmp

重啟資料庫問題依舊,查了一下dbsnmp是跟智慧代理相關的一個命令,嘗試手工執行:
$ /opt/oracle/product/9.2/bin/dbsnmp
DBSNMP for Linux 2.6.9-5.ELsmp: release 9.2.0.4.0 - Production on 09-APR-07 09:15:47
Discovering services on datasrv2 configured on host addresses {datasrv2 localhost 127.0.0.1}
Using oratab file /etc/oratab
Warning : LISTENER defined in /opt/oracle/product/9.2/network/admin/listener.ora will be skipped, because it does not monitor any of the valid SIDs {testcen}
Warning : No Listener found for SID testcen. testcen will be skipped

看報錯資訊似乎與監聽沒有配置SID相關,檢視listener.ora如下:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/9.2)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = datasrv2)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)


往監聽檔案上新增上sid相關資訊
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/9.2)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = testcen)
(ORACLE_HOME = /opt/oracle/product/9.2)
(SID_NAME = testcen)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = datasrv2)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)


然後重啟庫,再執行:
[oracle@datasrv2 admin]$ ps -ef|grep dbsnmp
oracle 3559 3496 0 09:45 pts/2 00:00:00 grep dbsnmp

可以看到問題已經解決。問題出現原因估計是因為oracle在不能啟動dbsnmp時會不斷重試,從而導致有多個dbsnmp的情況。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/231499/viewspace-63795/,如需轉載,請註明出處,否則將追究法律責任。

相關文章