Oracle資料庫修改LISTENER的監聽埠
轉自:http://www.cnblogs.com/chenleiustc/archive/2009/07/26/1531529.html
【強調一點】
由於oracle例項的動態註冊只能在預設埠1521上執行,埠修改後監聽一定要記得修改為“靜態註冊”方式。
否則您永遠也等不到LISTENER動態監聽到您的oracle例項!
【修改步驟】
1.修改listener.ora檔案,埠從1521修改成1526;同時將監聽改為“靜態註冊”
listener.ora檔案修改前:
ora10g@testdb /home/oracle$ cat $ORACLE_HOME/network/admin/listener.ora
# listener.ora Network Configuration File: /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 144.194.192.183)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
listener.ora檔案修改後:
ora10g@testdb /home/oracle$ cat $ORACLE_HOME/network/admin/listener.ora
# listener.ora Network Configuration File: /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC = ## 靜態註冊在這裡體現
(GLOBAL_DBNAME = ora10g)
(ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
(SID_NAME = ora10g)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 144.194.192.183)(PORT = 1526)(IP = FIRST)) ## 埠修改在這裡體現
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
2.修改tnsnames.ora檔案,將其中出現的1521埠號修改為1526
ora10g@testdb /home/oracle$ cat $ORACLE_HOME/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /oracle/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORA10G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 144.194.192.183)(PORT = 1526))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora10g)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
3.重新啟動LISTENER
LSNRCTL> stop
LSNRCTL> start
Starting /oracle/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /oracle/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=144.194.192.183)(PORT=1526)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=144.194.192.183)(PORT=1526)(IP=FIRST)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 21-JUL-2009 16:21:21
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /oracle/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=144.194.192.183)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ora10g" has 1 instance(s).
Instance "ora10g", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
4.使用ora10g進行測試
ora10g@testdb /home/oracle$ sqlplus sec/sec@ora10g
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 21 16:21:32 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
sec@ora10g>
一切OK,修改成功!
【買一贈一】修改監聽埠號後企業管理器(Enterprise Manager)對應的調整
1.修改emoms.properties屬性檔案中埠資訊
ora10g@testdb /home/oracle$ vi $ORACLE_HOME/${HOSTNAME}_${ORACLE_SID}/sysman/config/emoms.properties
這個檔案中有兩行含有1521埠號的資訊,將他們統統的修改為1526
oracle.sysman.eml.mntr.emdRepPort=1521
oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=testdb)(PORT\=1521)))(CONNECT_DATA\=(SERVICE_NAME\=ora10g)))
這兩個行修改後的內容如下
oracle.sysman.eml.mntr.emdRepPort=1526
oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=testdb)(PORT\=1526)))(CONNECT_DATA\=(SERVICE_NAME\=ora10g)))
2.修改targets.xml配置檔案中埠資訊
ora10g@testdb /home/oracle$ vi $ORACLE_HOME/${HOSTNAME}_${ORACLE_SID}/sysman/emd/targets.xml
這個檔案中的1521埠號的資訊統統的修改為1526
3.重啟EM
ora10g@testdb /home/oracle$ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://testdb:5500/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
ora10g@testdb /home/oracle$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://testdb:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ......................... started.
------------------------------------------------------------------
Logs are generated in directory /oracle/app/oracle/product/10.2.0/db_1/testdb_ora10g/sysman/log
4.驗證EM登陸
在本地瀏覽器中輸入如下的URL
http://144.194.192.183:5500/em/
看到登陸介面了,OK,搞定ed。
-- The End --
【強調一點】
由於oracle例項的動態註冊只能在預設埠1521上執行,埠修改後監聽一定要記得修改為“靜態註冊”方式。
否則您永遠也等不到LISTENER動態監聽到您的oracle例項!
【修改步驟】
1.修改listener.ora檔案,埠從1521修改成1526;同時將監聽改為“靜態註冊”
listener.ora檔案修改前:
ora10g@testdb /home/oracle$ cat $ORACLE_HOME/network/admin/listener.ora
# listener.ora Network Configuration File: /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 144.194.192.183)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
listener.ora檔案修改後:
ora10g@testdb /home/oracle$ cat $ORACLE_HOME/network/admin/listener.ora
# listener.ora Network Configuration File: /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC = ## 靜態註冊在這裡體現
(GLOBAL_DBNAME = ora10g)
(ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
(SID_NAME = ora10g)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 144.194.192.183)(PORT = 1526)(IP = FIRST)) ## 埠修改在這裡體現
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
2.修改tnsnames.ora檔案,將其中出現的1521埠號修改為1526
ora10g@testdb /home/oracle$ cat $ORACLE_HOME/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /oracle/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORA10G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 144.194.192.183)(PORT = 1526))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora10g)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
3.重新啟動LISTENER
LSNRCTL> stop
LSNRCTL> start
Starting /oracle/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /oracle/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=144.194.192.183)(PORT=1526)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=144.194.192.183)(PORT=1526)(IP=FIRST)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 21-JUL-2009 16:21:21
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /oracle/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=144.194.192.183)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ora10g" has 1 instance(s).
Instance "ora10g", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
4.使用ora10g進行測試
ora10g@testdb /home/oracle$ sqlplus sec/sec@ora10g
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 21 16:21:32 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
sec@ora10g>
一切OK,修改成功!
【買一贈一】修改監聽埠號後企業管理器(Enterprise Manager)對應的調整
1.修改emoms.properties屬性檔案中埠資訊
ora10g@testdb /home/oracle$ vi $ORACLE_HOME/${HOSTNAME}_${ORACLE_SID}/sysman/config/emoms.properties
這個檔案中有兩行含有1521埠號的資訊,將他們統統的修改為1526
oracle.sysman.eml.mntr.emdRepPort=1521
oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=testdb)(PORT\=1521)))(CONNECT_DATA\=(SERVICE_NAME\=ora10g)))
這兩個行修改後的內容如下
oracle.sysman.eml.mntr.emdRepPort=1526
oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=testdb)(PORT\=1526)))(CONNECT_DATA\=(SERVICE_NAME\=ora10g)))
2.修改targets.xml配置檔案中埠資訊
ora10g@testdb /home/oracle$ vi $ORACLE_HOME/${HOSTNAME}_${ORACLE_SID}/sysman/emd/targets.xml
這個檔案中的1521埠號的資訊統統的修改為1526
3.重啟EM
ora10g@testdb /home/oracle$ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://testdb:5500/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
ora10g@testdb /home/oracle$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://testdb:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ......................... started.
------------------------------------------------------------------
Logs are generated in directory /oracle/app/oracle/product/10.2.0/db_1/testdb_ora10g/sysman/log
4.驗證EM登陸
在本地瀏覽器中輸入如下的URL
http://144.194.192.183:5500/em/
看到登陸介面了,OK,搞定ed。
-- The End --
相關文章
- oracle之 單例項監聽修改埠Oracle單例
- Oracle 修改預設監聽埠故障分析Oracle
- 7、listener監聽
- Oracle 建立非1521埠監聽Oracle
- 12C RAC 修改監聽埠
- ORACLE之手動註冊監聽listener。alter system set local_listener="XXX"Oracle
- 【LISTENER】Oracle通過監聽連線緩慢分析Oracle
- oracle rac scan監聽更改埠號Oracle
- day25-Listener監聽器
- 啟動資料庫監聽資料庫
- Mysql資料庫監聽binlogMySql資料庫
- oracle監聽檔案listener.ora for 10g/11gOracle
- oracle 資料庫lsnrctl監聽的日誌路徑和trace檔案Oracle資料庫
- sqlserver資料庫埠號怎麼修改SQLServer資料庫
- 資料庫監聽夯故障分析資料庫
- 配置資料庫監聽白名單資料庫
- listener_scan1.log、listener.log監聽日誌清理
- 成為MySQL DBA後,再看ORACLE資料庫(二、監聽與連線)MySqlOracle資料庫
- Canal-監聽資料庫表的變化資料庫
- 使用NID修改Oracle資料庫名Oracle資料庫
- 初始化監聽埠
- samba程序與監聽埠Samba
- 【LISTENER】Oracle分析連線監聽情況,判斷客戶端IP分佈Oracle客戶端
- [Oracle]Oracle資料庫資料被修改或者刪除恢復資料Oracle資料庫
- 2.5.2. 監聽程式(listener)配置——2.5.2.1. netca
- 2.5.2. 監聽程式(listener)配置——2.5.2.2. netmgr
- oracle一個listener偵聽多個例項的配置Oracle
- windows10怎麼檢視監聽埠_windows10檢視監聽埠的方法Windows
- 修改Oracle資料庫字符集(zt)Oracle資料庫
- 2.5.2. 監聽程式(listener)配置——2.5.2.3. 手工編輯監聽器配置檔案
- Filter(過濾器)與Listener(監聽器)詳解Filter過濾器
- Zabbix+Python監控Oracle資料庫PythonOracle資料庫
- oracle靜態監聽Oracle
- JMS監聽Oracle AQOracle
- 「Oracle」資料庫字符集編碼修改Oracle資料庫
- ORACLE rac資料庫監聽與應用TNS連線串配置與ORA12519Oracle資料庫
- JAVA單元測試框架-13-TestNG中的Listener監聽Java框架
- nginx 80埠監聽多個域名Nginx
- oracle 12c 資料庫例項監聽無法註冊問題一例Oracle資料庫