0
点赞
收藏
分享

微信扫一扫

Oracle-修改动态监听为静态监听

1.原始动态监听文件配置

[root@11g000 ~]# su - oracle
Last login: Tue Jan 31 23:33:13 HKT 2023 on pts/1
[oracle@11g000 /home/oracle]$ cd $ORACLE_HOME/network/admin
[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$ cat listener.ora
# listener.ora Network Configuration File: /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 11g000)(PORT = 1521))
)
)

ADR_BASE_LISTENER = /home/app/oracleup/oracle

[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$

2.原始动态监听状态

[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 31-1月 -2023 23:48:59

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=11g000)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 31-1月 -2023 23:44:04
Uptime 0 days 0 hr. 4 min. 55 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin/listener.ora
Listener Log File /home/app/oracleup/oracle/diag/tnslsnr/11g000/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=11g000)(PORT=1521)))
Services Summary...
Service "baoyw" has 1 instance(s).
Instance "baoyw", status READY, has 1 handler(s) for this service...
Service "baoywXDB" has 1 instance(s).
Instance "baoyw", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$

3.修改为静态监听

Oracle-修改动态监听为静态监听_LISTENER

Oracle-修改动态监听为静态监听_动态监听_02

Oracle-修改动态监听为静态监听_LISTENER_03

Oracle-修改动态监听为静态监听_oracle_04

Oracle-修改动态监听为静态监听_oracle_05

Oracle-修改动态监听为静态监听_动态监听_06

Oracle-修改动态监听为静态监听_listener.ora_07

4.查看监听文件-已修改

[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$ cat listener.ora
# listener.ora Network Configuration File: /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = baoyw)
(ORACLE_HOME = /home/app/oracleup/oracle/product/11.2.0.4/db_1)
(SID_NAME = baoyw)
)
)

LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 11g000)(PORT = 1521))
)

ADR_BASE_LISTENER = /home/app/oracleup/oracle

[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$

5.再次查看监听状态并重启监听

[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 31-1月 -2023 23:57:43

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=11g000)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 31-1月 -2023 23:44:04
Uptime 0 days 0 hr. 13 min. 38 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin/listener.ora
Listener Log File /home/app/oracleup/oracle/diag/tnslsnr/11g000/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=11g000)(PORT=1521)))
Services Summary...
Service "baoyw" has 1 instance(s).
Instance "baoyw", status READY, has 1 handler(s) for this service...
Service "baoywXDB" has 1 instance(s).
Instance "baoyw", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 31-1月 -2023 23:57:51

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=11g000)(PORT=1521)))
The command completed successfully
[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 31-1月 -2023 23:57:59

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Starting /home/app/oracleup/oracle/product/11.2.0.4/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin/listener.ora
Log messages written to /home/app/oracleup/oracle/diag/tnslsnr/11g000/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=11g000)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=11g000)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 31-1月 -2023 23:58:00
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin/listener.ora
Listener Log File /home/app/oracleup/oracle/diag/tnslsnr/11g000/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=11g000)(PORT=1521)))
Services Summary...
Service "baoyw" has 1 instance(s).
Instance "baoyw", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$

6.监听状态改为静态监听-UNKNOWN

[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 31-1月 -2023 23:59:18

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=11g000)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 31-1月 -2023 23:58:00
Uptime 0 days 0 hr. 1 min. 18 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin/listener.ora
Listener Log File /home/app/oracleup/oracle/diag/tnslsnr/11g000/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=11g000)(PORT=1521)))
Services Summary...
Service "baoyw" has 2 instance(s).
Instance "baoyw", status UNKNOWN, has 1 handler(s) for this service...
Instance "baoyw", status READY, has 1 handler(s) for this service...
Service "baoywXDB" has 1 instance(s).
Instance "baoyw", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@11g000 /home/app/oracleup/oracle/product/11.2.0.4/db_1/network/admin]$

举报

相关推荐

0 条评论