首頁 資料庫 mysql教程 Oracle一个实例配置多个listener或多个端口

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

Jun 07, 2016 pm 05:25 PM

一个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.

 


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

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱門文章

倉庫:如何復興隊友
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
1 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱門文章

倉庫:如何復興隊友
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
1 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱門文章標籤

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

減少在Docker中使用MySQL內存的使用 減少在Docker中使用MySQL內存的使用 Mar 04, 2025 pm 03:52 PM

減少在Docker中使用MySQL內存的使用

如何使用Alter Table語句在MySQL中更改表? 如何使用Alter Table語句在MySQL中更改表? Mar 19, 2025 pm 03:51 PM

如何使用Alter Table語句在MySQL中更改表?

mysql無法打開共享庫怎麼解決 mysql無法打開共享庫怎麼解決 Mar 04, 2025 pm 04:01 PM

mysql無法打開共享庫怎麼解決

什麼是 SQLite?全面概述 什麼是 SQLite?全面概述 Mar 04, 2025 pm 03:55 PM

什麼是 SQLite?全面概述

在 Linux 中運行 MySQl(有/沒有帶有 phpmyadmin 的 podman 容器) 在 Linux 中運行 MySQl(有/沒有帶有 phpmyadmin 的 podman 容器) Mar 04, 2025 pm 03:54 PM

在 Linux 中運行 MySQl(有/沒有帶有 phpmyadmin 的 podman 容器)

在MacOS上運行多個MySQL版本:逐步指南 在MacOS上運行多個MySQL版本:逐步指南 Mar 04, 2025 pm 03:49 PM

在MacOS上運行多個MySQL版本:逐步指南

如何保護MySQL免受常見漏洞(SQL注入,蠻力攻擊)? 如何保護MySQL免受常見漏洞(SQL注入,蠻力攻擊)? Mar 18, 2025 pm 12:00 PM

如何保護MySQL免受常見漏洞(SQL注入,蠻力攻擊)?

如何為MySQL連接配置SSL/TLS加密? 如何為MySQL連接配置SSL/TLS加密? Mar 18, 2025 pm 12:01 PM

如何為MySQL連接配置SSL/TLS加密?

See all articles