我的编程空间,编程开发者的网络收藏夹
学习永远不晚

oracle单实例如何监听修改端口

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

oracle单实例如何监听修改端口

小编给大家分享一下oracle单实例如何监听修改端口,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

Oracle 单一主机多个实例多个监听器配置要点  
 1. 一台服务器主机, 有多个实例, 如: TSDB/ORCL; 又需要配置多个监听器
 2. 需要指定不同的LISTENER端口  
 3.pmon只会动态注册port等于1521的监听器, 其它端口则pmon不能动态注册listener, 要想让pmon动态注册listener, 需要设置local_listener参数 

[oracle@12c01 admin]$ cat listener.ora 

ANDYCDB =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ANDYCDB_TEST =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522))
    )
  )

[oracle@12c01 admin]$ cat tnsnames.ora 
# tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

ANDYCDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = andycdb)
    )
  )


LISTENER_ANDYCDB =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))

PDB01 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdb01)
    )
  )

LISTENER_PDB01 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521)

LISTENER_TEST =  
(DESCRIPTION =  
(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522))  


#################
lsnrctl操作:
LSNRCTL>  set current_listener ANDYCDB_TEST
Current Listener is ANDYCDB_TEST

LSNRCTL> start
Starting /home/oracle/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait...


TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12c01)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     ANDYCDB_TEST
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                10-APR-2018 21:59:17
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))
The listener supports no services

The command completed successfully

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12c01)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     ANDYCDB_TEST
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                10-APR-2018 21:59:17
Uptime                    0 days 0 hr. 1 min. 26 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))
The listener supports no services
The command completed successfully

-- 设置一个监听端口
SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522))';
System altered.

[oracle@12c01 admin]$ lsnrctl status andycdb_test

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 10-APR-2018 22:38:32

Copyright (c) 1991, 2016, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12c01)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     ANDYCDB_TEST
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                10-APR-2018 21:59:17
Uptime                    0 days 0 hr. 39 min. 16 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))
Services Summary...
Service "4f44590eb7b74390e0531018db0a1976" has 1 instance(s).
  Instance "andycdb", status READY, has 1 handler(s) for this service...
Service "andycdb" has 1 instance(s).
  Instance "andycdb", status READY, has 1 handler(s) for this service...
Service "andycdbXDB" has 1 instance(s).
  Instance "andycdb", status READY, has 1 handler(s) for this service...
Service "pdb01" has 1 instance(s).
  Instance "andycdb", status READY, has 1 handler(s) for this service...
The command completed successfully

-- 设置多个监听端口
SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522)),(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1521)))';
System altered.

以上是“oracle单实例如何监听修改端口”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

oracle单实例如何监听修改端口

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

oracle如何修改端口

oracle 端口修改过程包括以下步骤:编辑 listener.ora 配置文件并更改 port 行中的端口号。停止并重启 oracle 监听器服务。(可选)更新 tnsnames.ora 文件中的连接字符串。使用新端口号测试数据库连接。如
oracle如何修改端口
2024-04-19

linux如何修改oracle端口

要修改Oracle的端口,需要进行以下步骤:1. 使用root用户登录到Linux系统。2. 打开Oracle的监听配置文件`listener.ora`,该文件通常位于`$ORACLE_HOME/network/admin`目录下。可以使用
2023-09-29

oracle数据库端口号如何修改

要修改Oracle数据库的端口号,可以按照以下步骤操作:进入Oracle数据库的监听器配置文件。在Oracle数据库安装目录下找到listener.ora文件,通常位于$ORACLE_HOME/network/admin目录下。打开list
oracle数据库端口号如何修改
2024-04-09

编程热搜

目录