Oracle一个实例配置多个listener或多个端口

php中文网
发布: 2016-06-07 17:25:38
原创
1897人浏览过

一个oracle实例对于多个监听,一个监听对于多个端口。现在我们可以创建一个oracle实例一个监听的两个端口。这一共有两种方法:

oracle一个实例配置多个listener或多个端口

listener.ora文件的内容如下:

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db)

      (PROGRAM = extproc)

    )

    (SID_DESC =

      (GLOBAL_DBNAME = jingyong)

      (ORACLE_HOME =/u01/app/oracle/product/10.2.0/db)

      (SID_NAME = jingyong)

    )

  )

 


LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = jingyong)(PORT = 1521))

    )

  )

上面的配置只配置了一个listener

 


下面再增加一个listener_2

SID_LIST_LISTENER_2 =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db)

      (PROGRAM = extproc)

    )

    (SID_DESC =

      (GLOBAL_DBNAME = jingyong)

      (ORACLE_HOME =/u01/app/oracle/product/10.2.0/db)

      (SID_NAME = jingyong)

    )

  )

 


LISTENER_2 =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = jingyong)(PORT = 1522))

    )

  )

SID_LIST_ 这里的要和LISTENER名称一致。

SID_DESC则注册要提供服务的数据库实例名。这样LISTENER2 才能够提供服务。

 


再来启动两个listener

[oracle@jingyong udump]$ lsnrctl stop listener

 


LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 13-JAN-2013 18:06:21

 


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

AI帮个忙
AI帮个忙

多功能AI小工具,帮你快速生成周报、日报、邮、简历等

AI帮个忙 55
查看详情 AI帮个忙

 


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=jingyong)(PORT=1521)))

The command completed successfully

[oracle@jingyong udump]$ lsnrctl start listener_2

 


LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 13-JAN-2013 18:06:37

 


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

 


Starting /u01/app/oracle/product/10.2.0/db/bin/tnslsnr: please wait...

 


TNSLSNR for Linux: Version 10.2.0.1.0 - Production

System parameter file is /u01/app/oracle/product/10.2.0/db/network/admin/listener.ora

Log messages written to /u01/app/oracle/product/10.2.0/db/network/log/listener_2.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jingyong)(PORT=1522)))

 


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=jingyong)(PORT=1522)))

STATUS of the LISTENER

------------------------

Alias                    listener_2

Version                  TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                13-JAN-2013 18:06:37

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level              off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File  /u01/app/oracle/product/10.2.0/db/network/admin/listener.ora

Listener Log File        /u01/app/oracle/product/10.2.0/db/network/log/listener_2.log

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jingyong)(PORT=1522)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "jingyong" has 1 instance(s).

  Instance "jingyong", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

[oracle@jingyong udump]$ lsnrctl start listener

 


LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 13-JAN-2013 18:06:41

 


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

 


Starting /u01/app/oracle/product/10.2.0/db/bin/tnslsnr: please wait...

 


TNSLSNR for Linux: Version 10.2.0.1.0 - Production

System parameter file is /u01/app/oracle/product/10.2.0/db/network/admin/listener.ora

Log messages written to /u01/app/oracle/product/10.2.0/db/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jingyong)(PORT=1521)))

 


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=jingyong)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                    listener

Version                  TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                13-JAN-2013 18:06:41

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level              off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File  /u01/app/oracle/product/10.2.0/db/network/admin/listener.ora

Listener Log File        /u01/app/oracle/product/10.2.0/db/network/log/listener.log

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jingyong)(PORT=1521)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "jingyong" has 1 instance(s).

  Instance "jingyong", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

linux

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号