关于oracle监听程序的相关问题及解决方法
1.查看監聽程序是否啟動
打開cmd窗口,cmd用管理員運行,否則無法執行啟動與停止監聽命令
lsnrctl status查看運行狀態
lsnrctl stop停止監聽
lsnrctl start啟動監聽
執行停止監聽命令
2.修改監聽配置文件
?
a> 打開<OracleHome>/network/admin/listener.ora文件,找到:
???SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\glass\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\glass\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
???)
GLOBAL_DBNAME全局數據庫默認為orcl.hostname,安裝數據庫時配置
??b> 添加:
????????????(SID_DESC =
???????(GLOBAL_DBNAME = ORCL.16.167.16)需要修改
???????(ORACLE_HOME = C:\app\glass\product\11.2.0\dbhome_1)??
???????(SID_NAME = ORCL)需要修改
??????)
c> 修改后的配置文件如下
# listener.ora Network Configuration File: C:\app\glass\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
??(SID_LIST =
????(SID_DESC =
??????(SID_NAME = CLRExtProc)
??????(ORACLE_HOME = C:\app\glass\product\11.2.0\dbhome_1)
??????(PROGRAM = extproc)
??????(ENVS = "EXTPROC_DLLS=ONLY:C:\app\glass\product\11.2.0\dbhome_1\bin\oraclr11.dll")
????)
?
??(SID_DESC =
???????(GLOBAL_DBNAME = ORCL.16.167.16)
???????(ORACLE_HOME = C:\app\glass\product\11.2.0\dbhome_1)?
???????(SID_NAME = ORCL)
??????)
??)
LISTENER =
??(DESCRIPTION_LIST =
????(DESCRIPTION =
??????(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
????)
????(DESCRIPTION =
??????(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.167.16)(PORT = 1521))
????)
????(DESCRIPTION =
??????(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
????)
??)
?
ADR_BASE_LISTENER = C:\app\glass
?
注意:配置文件中配置的ip必須為有效的ip,否則無法啟動,如果電腦ip不固定,變化ip后,剛會導致oracle監聽無法啟動,可根據需要自己配置,若只在本機上使用,可只保留127.0.0.1的ip,這樣不管是否連網,都能順利啟動監聽程序
轉載于:https://www.cnblogs.com/yanjie-java/p/8452327.html
總結
以上是生活随笔為你收集整理的关于oracle监听程序的相关问题及解决方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Oracle 11g Express E
- 下一篇: 【工具使用系列】关于 MATLAB 电路