[20160418]修改oracle監聽埠.txt
[20160418]修改oracle監聽埠.txt
--上午開發提出要修改oracle的監聽埠,我以前測試遇到過一些問題:
--連結: http://blog.itpub.net/267265/viewspace-758983/
-- 但是在11.2.0.4下遇到以前不一樣的情況,時間太久了,測試在2013年做的,也許現在存在一些變化.
1.無靜態註冊監聽:
SYS@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
--以前的測試在11.2.0.3做的.
$ cd /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin
$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
# (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.78)(PORT = 1529))
# (ADDRESS = (PROTOCOL = TCP)(HOST = gxqyydg4)(PORT = 1529))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
DIAG_ADR_ENABLED_LISTENER=OFF
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-APR-2016 15:36:21
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.78)(PORT=1529)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-APR-2016 15:36:06
Uptime 0 days 0 hr. 0 min. 15 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.78)(PORT=1529)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
--很奇怪這個時候無論執行 alter system register ;,看到的結果都是像上面一樣.
$ sqlplus -L scott/book@192.168.100.78:1529/book
$ sqlplus -L scott/book@192.168.100.78:1521/book
--都是報ORA-12541: TNS:no listener錯誤.
SYS@book> alter system set local_listener='(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.78)(PORT=1529))' scope=memory ;
System altered.
SYS@book> alter system register ;
System altered.
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-APR-2016 15:40:41
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.78)(PORT=1529)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-APR-2016 15:36:06
Uptime 0 days 0 hr. 4 min. 35 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.78)(PORT=1529)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "book" has 1 instance(s).
Instance "book", status READY, has 2 handler(s) for this service...
Service "bookXDB" has 1 instance(s).
Instance "book", status READY, has 1 handler(s) for this service...
The command completed successfully
--這個時候可以動態註冊.執行如下可以登入,看來以前11.2.0.3測試存在的問題實際上是一個bug.
$ sqlplus -L scott/book@192.168.100.78:1529/book
2.再看看看存在靜態監聽註冊的情況:
$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
#SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SDU=32767)
(GLOBAL_DBNAME = book)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0.4/dbhome_1)
(SID_NAME = book)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
# (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.78)(PORT = 1529))
# (ADDRESS = (PROTOCOL = TCP)(HOST = gxqyydg4)(PORT = 1529))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
DIAG_ADR_ENABLED_LISTENER=OFF
SYS@book> alter system set local_listener='' scope=memory ;
System altered.
--如果害怕影響,最好的方法就是重啟資料庫.
SYS@book> alter system register ;
System altered.
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-APR-2016 15:46:57
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.78)(PORT=1529)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-APR-2016 15:45:27
Uptime 0 days 0 hr. 1 min. 29 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.78)(PORT=1529)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "book" has 1 instance(s).
Instance "book", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
$ sqlplus -L scott/book@192.168.100.78:1529/book => 透過ok
$ sqlplus -L scott/book@192.168.100.78:1521/book => 報錯ORA-12541.
3.總結:
1.看來以前在11.2.0.3遇到的問題,應該是bug.
2.要使用非標準埠,可以使用靜態註冊。這樣可以不要修改引數local_listener.但是動態註冊1521埠無效,也就是無法再透過1521
埠連線資料庫。
3.使用非標準埠,如果使用非靜態註冊,必須修改local_listener引數,讓動態註冊使用非標準的埠來實現,這樣就無法使用1521埠。
4.總之,修改監聽的預設埠,無法再使用1521埠連線資料庫.
5.看來以前遇到的是bug.要以動態的態度看待oracle,不能報老經驗,一句話最好的方法就是測試.
--另外我還發現一些問題,如果配置靜態監聽並且使用1521埠:
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-APR-2016 16:24:32
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.78)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-APR-2016 16:22:55
Uptime 0 days 0 hr. 1 min. 36 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.78)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gxqyydg4)(PORT=8888))(Presentation=HTTP)(Session=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gxqyydg4)(PORT=7777))(Presentation=FTP)(Session=RAW))
Services Summary...
Service "book" has 1 instance(s).
Instance "book", status READY, has 2 handler(s) for this service...
Service "bookXDB" has 1 instance(s).
Instance "book", status READY, has 1 handler(s) for this service...
The command completed successfully
--我還開啟了http 8888,以及ftp的7777埠.而如果使用非標準埠,是看不到了http 8888,以及ftp的7777.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2083455/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【Oracle】修改oracle監聽埠Oracle
- [20130422]修改oracle監聽埠.txtOracle
- 【Oracle】修改scan監聽器埠號Oracle
- Oracle 11g 修改監聽埠Oracle
- Oracle 修改預設監聽埠故障分析Oracle
- oracle之 單例項監聽修改埠Oracle單例
- Oracle資料庫修改LISTENER的監聽埠Oracle資料庫
- 修改oracle監聽佔用的8080埠(轉)Oracle
- oracle 11g 修改預設監聽埠1521Oracle
- 12C RAC 修改監聽埠
- oracle 監聽配置多個埠Oracle
- oracle rac scan監聽更改埠號Oracle
- Oracle 建立非1521埠監聽Oracle
- 如何更改oracle監聽器的埠Oracle
- ORACLE 修改11.2.0.4 RAC 預設監聽埠號1521為1621Oracle
- Oracle之 11gR2 RAC 修改監聽器埠號的步驟Oracle
- 【監聽】配置服務端靜態(動態)監聽/修改監聽埠及引數local_listener作用服務端
- Windows server 防火牆開放oracle監聽埠WindowsServer防火牆Oracle
- [20161227]開啟多個監聽埠.txt
- 修改服務端監聽器埠號為1526服務端
- oracle監聽【非1521埠】動態註冊Oracle
- 初始化監聽埠
- samba程序與監聽埠Samba
- 【LISTENER】修改 LISTENER的監聽埠為1526(動態註冊)
- 【LISTENER】修改 LISTENER的監聽埠為1526(靜態註冊)
- Sqlserver重啟alwayson監聽埠SQLServer
- Oracle 監聽Oracle
- oracle em 修改埠Oracle
- ORACLE 動態註冊,靜態註冊,多個監聽,一個監聽多個埠配置Oracle
- windows10怎麼檢視監聽埠_windows10檢視監聽埠的方法Windows
- nginx 80埠監聽多個域名Nginx
- Tomcat監聽443埠的方法Tomcat
- mysql的啟動,以及修改偵聽埠。MySql
- oracle更改預設埠號,監聽器加密,限制ip訪問Oracle加密
- Oracle監聽(1)Oracle
- ORACLE動態監聽與靜態監聽Oracle
- oracle靜態監聽和動態監聽Oracle
- 【oracle】動態監聽與靜態監聽Oracle