修改服務端監聽器埠號為1526
----修改服務端監聽的埠號為1526:
--配置服務端listener.ora檔案:
[oracle@enmo admin]$ vi listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LSNR2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = enmo)(PORT = 1526))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526))
)
)
--配置服務端tnsnames.ora檔案:
[oracle@enmo admin]$ vi tnsnames.ora
LSNR2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = enmo)(PORT = 1526))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526))
)
)
~
--修改服務端的預設監聽:
SQL> alter system set local_listener='LSNR2';
System altered.
--啟動埠號為1526的監聽:
[oracle@enmo admin]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 03-NOV-2016 23:31:36
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL>
LSNRCTL> start lsnr2
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/enmo/lsnr2/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=enmo.oracle.com)(PORT=1526)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1526)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=enmo)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias lsnr2
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 03-NOV-2016 23:31:54
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/enmo/lsnr2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=enmo.oracle.com)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1526)))
The listener supports no services
The command completed successfully
LSNRCTL>
--主動註冊資料庫到監聽器:
SQL> alter system register;
System altered.
--再次檢視監聽的狀態:
LSNRCTL> status lsnr2
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=enmo)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias lsnr2
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 03-NOV-2016 23:31:54
Uptime 0 days 0 hr. 1 min. 44 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/enmo/lsnr2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=enmo.oracle.com)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1526)))
Services Summary...
Service "PROD" has 1 instance(s).
Instance "PROD", status READY, has 1 handler(s) for this service...
Service "PRODXDB" has 1 instance(s).
Instance "PROD", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
#看到埠號為1526的監聽器正常工作。
--客戶端配置tnsnames.ora檔案:
[oracle@host01 admin]$ vi tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORA11 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.6)(PORT = 1526))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROD)
)
)
--嘗試使用連線串tnsping通服務端:
[oracle@host01 admin]$ tnsping ora11
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 03-NOV-2016 23:36:33
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.6)(PORT = 1526)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = PROD)))
OK (0 msec)
[oracle@host01 admin]$
[oracle@host01 admin]$
--嘗試連線服務端資料庫PROD庫:
[oracle@host01 admin]$ sqlplus sys/oracle@ora11 as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 3 23:37:52 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter service
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string PROD
SQL>
--在Windows使用EZCONNECT連線:
C:\Users\Asus>
C:\Users\Asus>sqlplus sys/oracle@192.168.2.6:1526/PROD as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期四 11月 3 23:40:45 2016
Copyright (c) 1982, 2010, Oracle. All rights reserved.
連線到:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter service
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
service_names string
PROD
SQL>
修改成功。
--配置服務端listener.ora檔案:
[oracle@enmo admin]$ vi listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LSNR2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = enmo)(PORT = 1526))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526))
)
)
--配置服務端tnsnames.ora檔案:
[oracle@enmo admin]$ vi tnsnames.ora
LSNR2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = enmo)(PORT = 1526))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526))
)
)
~
--修改服務端的預設監聽:
SQL> alter system set local_listener='LSNR2';
System altered.
--啟動埠號為1526的監聽:
[oracle@enmo admin]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 03-NOV-2016 23:31:36
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL>
LSNRCTL> start lsnr2
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/enmo/lsnr2/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=enmo.oracle.com)(PORT=1526)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1526)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=enmo)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias lsnr2
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 03-NOV-2016 23:31:54
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/enmo/lsnr2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=enmo.oracle.com)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1526)))
The listener supports no services
The command completed successfully
LSNRCTL>
--主動註冊資料庫到監聽器:
SQL> alter system register;
System altered.
--再次檢視監聽的狀態:
LSNRCTL> status lsnr2
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=enmo)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias lsnr2
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 03-NOV-2016 23:31:54
Uptime 0 days 0 hr. 1 min. 44 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/enmo/lsnr2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=enmo.oracle.com)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1526)))
Services Summary...
Service "PROD" has 1 instance(s).
Instance "PROD", status READY, has 1 handler(s) for this service...
Service "PRODXDB" has 1 instance(s).
Instance "PROD", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
#看到埠號為1526的監聽器正常工作。
--客戶端配置tnsnames.ora檔案:
[oracle@host01 admin]$ vi tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORA11 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.6)(PORT = 1526))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROD)
)
)
--嘗試使用連線串tnsping通服務端:
[oracle@host01 admin]$ tnsping ora11
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 03-NOV-2016 23:36:33
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.6)(PORT = 1526)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = PROD)))
OK (0 msec)
[oracle@host01 admin]$
[oracle@host01 admin]$
--嘗試連線服務端資料庫PROD庫:
[oracle@host01 admin]$ sqlplus sys/oracle@ora11 as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 3 23:37:52 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter service
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string PROD
SQL>
--在Windows使用EZCONNECT連線:
C:\Users\Asus>
C:\Users\Asus>sqlplus sys/oracle@192.168.2.6:1526/PROD as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期四 11月 3 23:40:45 2016
Copyright (c) 1982, 2010, Oracle. All rights reserved.
連線到:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter service
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
service_names string
PROD
SQL>
修改成功。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31392094/viewspace-2127791/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 服務端配置一個多埠號(如1521/1526)監聽器服務端
- 【Oracle】修改scan監聽器埠號Oracle
- 【LISTENER】修改 LISTENER的監聽埠為1526(動態註冊)
- 【LISTENER】修改 LISTENER的監聽埠為1526(靜態註冊)
- 【監聽】配置服務端靜態(動態)監聽/修改監聽埠及引數local_listener作用服務端
- 【Oracle】修改oracle監聽埠Oracle
- ORACLE 修改11.2.0.4 RAC 預設監聽埠號1521為1621Oracle
- Oracle之 11gR2 RAC 修改監聽器埠號的步驟Oracle
- 如何發現遠端伺服器上某埠正在監聽的ORACLE例項/服務伺服器Oracle
- 12C RAC 修改監聽埠
- Oracle 11g 修改監聽埠Oracle
- oracle rac scan監聽更改埠號Oracle
- Oracle 修改預設監聽埠故障分析Oracle
- oracle之 單例項監聽修改埠Oracle單例
- Windows平臺如何修改監聽的服務名稱?Windows
- Oracle資料庫修改LISTENER的監聽埠Oracle資料庫
- oracle更改預設埠號,監聽器加密,限制ip訪問Oracle加密
- 修改Windows預設遠端埠號Windows
- Android Service 服務的應用之電話監聽器以及簡訊監聽器Android
- 如何更改oracle監聽器的埠Oracle
- [20160418]修改oracle監聽埠.txtOracle
- 修改oracle監聽佔用的8080埠(轉)Oracle
- 遠端控制監聽器
- 如何配置多個監聽器不同埠
- Oracle監聽器中的XDB、XPT和PLSExtProc服務Oracle
- RAKsmart伺服器:Windows修改遠端埠號的圖文教程伺服器Windows
- oracle 11g 修改預設監聽埠1521Oracle
- [20130422]修改oracle監聽埠.txtOracle
- 伺服器端監聽器配置伺服器
- 常用埠號及對應服務
- ssh遠端埠轉發無法監聽0.0.0.0
- oracle監聽不到例項服務Oracle
- netty服務端監聽客戶端連線加入和斷開事件Netty服務端客戶端事件
- 修改Tomcat服務中的埠配置Tomcat
- 為監聽設定密碼防止遠端關閉監聽密碼
- SQLSERVER為什麼不監聽1433埠SQLServer
- 【LISTENER】一個資料庫配置兩個監聽埠號資料庫
- centos 7 下搭建zabbix監聽服務CentOS