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
一個oracle例項對於多個監聽,一個監聽對於多個埠。
現在我們可以建立一個oracle例項一個監聽的兩個埠。這一共有兩種方法:
在listener檔案新增一行,具體如下:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = jingyong)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = jingyong)(PORT = 1522))
)
)
這時我們只有重啟監聽,就可以用兩個埠連線資料庫例項了。。。。
當然我們也可以一個例項啟動兩個監聽,但是具體只有一個監聽起作用。
我們可以在一個資料庫下,一個例項對於一個監聽,但例項必須在不同目錄。或者先建監聽,再建例項。一樣能達到效果。。。
具體配置如下:
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))
)
)
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))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = jingyong)(PORT = 1523))
)
)
[@more@]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-1060100/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle一個例項配置多個listener或多個埠Oracle
- oracle一個listener偵聽多個例項的配置Oracle
- 多個ORACLE資料庫例項下listener.ora檔案配置Oracle資料庫
- 同一Server上兩個資料庫例項共用listener.ora ,監聽多個埠Server資料庫
- oracle 監聽配置多個埠Oracle
- oracle 多個例項監聽不到Oracle
- oracle多個例項啟動方法Oracle
- ORACLE 動態註冊,靜態註冊,多個監聽,一個監聽多個埠配置Oracle
- Git配置單個或多個SSHGit
- 一個例項中,多個synchronized方法的呼叫synchronized
- oracle 多個例項安裝監聽Oracle
- docker redis 多個例項DockerRedis
- Oracle 多個例項 沒有listener.ora/sqlnet.ora/tnsnames.oraOracleSQL
- 【LISTENER】一個資料庫配置兩個監聽埠號資料庫
- 多個mapreduce連線例項
- 一個作業系統下安裝多個版本DB的Listener配置作業系統
- 如何配置多個監聽器不同埠
- Apache配置多個專案公用80埠Apache
- 多個資料庫是否可以共有一個Oracle 11g RAC例項KG資料庫Oracle
- yml配置從nacos配置中心取資料(單個或多個)
- oracle:一臺主機多個例項,sqlplus 預設連線到哪個例項的問題OracleSQL
- tomcat下多個埠,多個應用(轉載)Tomcat
- java多型-優化上個例項Java多型優化
- 一臺MySQL資料庫啟動多個例項MySql資料庫
- 一個簡單多庫配置
- nginx + 一個埠 部署多個單頁應用(history模式)Nginx模式
- Linux中執行多個MySQL例項LinuxMySql
- 在Windows中執行多個MySQL例項WindowsMySql
- mysqld_multi安裝多個mysql例項MySql
- mysqld_multi啟動多個mysql例項MySql
- 如何用python判斷列表中是否包含多個字串中的一個或多個?Python字串
- 當多個UITextView使用同一個UIView例項出現凍屏現象UITextView
- linux自動automatic啟動停止多個oracle例項LinuxOracle
- linux下一個網路卡配置多個IPLinux
- apache一個IP多個站點的配置方法Apache
- 在一臺機器配置兩個listener(Oracle)(轉)Oracle
- apache中配置多個IP對應多個網站Apache網站
- 多listener 埠的問題