真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

Oracle監(jiān)聽的靜態(tài)注冊(cè)和動(dòng)態(tài)注冊(cè)-創(chuàng)新互聯(lián)

靜態(tài)注冊(cè):通過解析listene.ora文件

創(chuàng)新互聯(lián)致力于互聯(lián)網(wǎng)品牌建設(shè)與網(wǎng)絡(luò)營銷,包括成都網(wǎng)站設(shè)計(jì)、做網(wǎng)站、成都外貿(mào)網(wǎng)站建設(shè)公司、SEO優(yōu)化、網(wǎng)絡(luò)推廣、整站優(yōu)化營銷策劃推廣、電子商務(wù)、移動(dòng)互聯(lián)網(wǎng)營銷等。創(chuàng)新互聯(lián)為不同類型的客戶提供良好的互聯(lián)網(wǎng)應(yīng)用定制及解決方案,創(chuàng)新互聯(lián)核心團(tuán)隊(duì)10余年專注互聯(lián)網(wǎng)開發(fā),積累了豐富的網(wǎng)站經(jīng)驗(yàn),為廣大企業(yè)客戶提供一站式企業(yè)網(wǎng)站建設(shè)服務(wù),在網(wǎng)站建設(shè)行業(yè)內(nèi)樹立了良好口碑。

動(dòng)態(tài)注冊(cè):由PMON進(jìn)程動(dòng)態(tài)注冊(cè)至監(jiān)聽中

在沒有l(wèi)istener.ora配置文件的情況下,如果啟動(dòng)監(jiān)聽,則監(jiān)聽為動(dòng)態(tài)注冊(cè)。用圖形化netca創(chuàng)建的監(jiān)聽,默認(rèn)也為動(dòng)態(tài)注冊(cè)

1.靜態(tài)注冊(cè)

listener.ora文件,監(jiān)聽的配置文件,靜態(tài)注冊(cè)讀取該文件,動(dòng)態(tài)注冊(cè),不必要

可以通過netca工具創(chuàng)建,也可以手動(dòng)編輯。典型的listener.ora文件內(nèi)容:

LISTENER_PHAMR =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = phamrdb1-vip)(PORT = 1521))
  )

 

SID_LIST_LISTENER_PHALR =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = phalr)
      (ORACLE_HOME = /oracle/product/11.2.0)
      (SID_NAME = phalr)
    )
  )

listener.ora文件兩大模塊:

LISTENER模塊:監(jiān)聽名字、連接協(xié)議、監(jiān)聽主機(jī)、監(jiān)聽端口等基本配置信息

SID_LIST_LISTENER模塊:配置監(jiān)聽的靜態(tài)注冊(cè)特性,包含數(shù)據(jù)庫服務(wù)名、ORACLE_HOME、實(shí)例名等信息。

注意:SID_NAME,就是數(shù)據(jù)庫實(shí)例名,在Linux環(huán)境大小寫敏感

GLOBAL_DBNAME就是數(shù)據(jù)庫服務(wù)名,可以省略,默認(rèn)和SID_NAME保持一致,也可以不一致。

ORACLE_HOME,默認(rèn)和$ORACLE_HOME環(huán)境變量保持一致。Windows,該參數(shù)無效,取自注冊(cè)表。

靜態(tài)注冊(cè),監(jiān)聽不知道實(shí)例的具體狀態(tài),所以監(jiān)聽啟動(dòng)之初查看實(shí)例信息,其狀態(tài)信息顯示為UNKNOWN.例如:

oracle@phamrdb1: /home/oracle> lsnrctl status LISTENER_PHAMR

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 17-NOV-2016 17:17:37

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=phamrdb1-vip)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_PHAMR
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                01-OCT-2016 14:12:51
Uptime                    47 days 3 hr. 4 min. 45 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/product/11.2.0/network/admin/listener.ora
Listener Log File         /oracle/diag/tnslsnr/phamrdb1/listener_phamr/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.178.1.64)(PORT=1521)))
Services Summary...
Service "phamr" has 1 instance(s).     監(jiān)聽狀態(tài)中的服務(wù)名
  Instance "phamr", status UNKNOWN, has 1 handler(s) for this service...  監(jiān)聽狀態(tài)中的實(shí)例名
The command completed successfully

2,動(dòng)態(tài)注冊(cè)
在動(dòng)態(tài)注冊(cè)監(jiān)聽的環(huán)境中,listener.ora文件可以不包括當(dāng)前數(shù)據(jù)庫的實(shí)例信息,所以這個(gè)文件不必要。

實(shí)例啟動(dòng)時(shí),會(huì)由Oracle PMON進(jìn)程將數(shù)據(jù)庫實(shí)例信息動(dòng)態(tài)注冊(cè)至監(jiān)聽上。

當(dāng)Oracle實(shí)例關(guān)閉時(shí),會(huì)再次由PMON進(jìn)程自動(dòng)從監(jiān)聽里面撤銷當(dāng)前實(shí)例信息。

所以,要實(shí)現(xiàn)動(dòng)態(tài)注冊(cè),數(shù)據(jù)庫的實(shí)例至少要處于nomount狀態(tài)

監(jiān)聽動(dòng)態(tài)注冊(cè)時(shí)的實(shí)例狀態(tài):來自PMON進(jìn)程動(dòng)態(tài)注冊(cè)時(shí)的實(shí)例狀態(tài),一般有3種狀態(tài):READY、BLOCKED和RESTRICED

READY:表示數(shù)據(jù)庫實(shí)例已經(jīng)處于mount或者open狀態(tài),可以接受客戶端連接

BLOCKED:表示數(shù)據(jù)庫實(shí)例還處于nomount狀態(tài)或者該實(shí)例類型為ASM實(shí)例,不接受客戶端連接,如果這時(shí)候客戶端去連

               接數(shù)據(jù)庫會(huì)報(bào)ora-12528錯(cuò)誤

RESTRICED:表示數(shù)據(jù)庫處于RESTRICED模式,不接受普通權(quán)限的遠(yuǎn)程客戶端連接,如果這時(shí)候客戶端去連接數(shù)據(jù)庫會(huì)報(bào)

                  ora-12526錯(cuò)誤

oracle@fsdata: /oracle/product/11.2.0/network/admin> lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 17-NOV-2016 16:01:43

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                17-NOV-2016 15:57:23
Uptime                    0 days 0 hr. 4 min. 19 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /oracle/diag/tnslsnr/fsdata/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=fsdata)(PORT=1521)))
Services Summary...
Service "FSDATA" has 1 instance(s).
  Instance "FSDATA", status READY, has 1 handler(s) for this service...
Service "FSDATAXDB" has 1 instance(s).
  Instance "FSDATA", status READY, has 1 handler(s) for this service...
The command completed successfully 

oracle@fsdata: /oracle/product/11.2.0/network/admin> lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 17-NOV-2016 15:58:47

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                17-NOV-2016 15:57:23
Uptime                    0 days 0 hr. 1 min. 23 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /oracle/diag/tnslsnr/fsdata/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=fsdata)(PORT=1521)))
Services Summary...
Service "FSDATA" has 1 instance(s).
  Instance "FSDATA", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully 

實(shí)例既可以動(dòng)態(tài)注冊(cè),同時(shí)靜態(tài)注冊(cè),狀態(tài)分別顯示為READY和UNKNOWN

oracle@fsdata: /oracle/product/11.2.0/network/admin> lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 17-NOV-2016 17:50:14

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fsdata)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                17-NOV-2016 15:57:23
Uptime                    0 days 1 hr. 52 min. 50 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/product/11.2.0/network/admin/listener.ora
Listener Log File         /oracle/diag/tnslsnr/fsdata/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=fsdata)(PORT=1521)))
Services Summary...
Service "FSDATA" has 2 instance(s).
  Instance "FSDATA", status UNKNOWN, has 1 handler(s) for this service...
  Instance "FSDATA", status READY, has 1 handler(s) for this service...
Service "FSDATAXDB" has 1 instance(s).
  Instance "FSDATA", status READY, has 1 handler(s) for this service...
The command completed successfully 

3.監(jiān)聽的常用命令

lsnrctl start [listener_name]

lsnrctl stop [listener_name]

lsnrctl status [listener_name]

lsnrctl service [listener_name]

lsnrctl reload [listener_name]

4.監(jiān)聽的別名

監(jiān)聽默認(rèn)名字是LISTENER,可以配置別名

oracle@fsdata: /dump> ps -ef | grep tnslsnr | grep  -v grep
oracle   29598     1  0 15:57 ?        00:00:00 /oracle/product/11.2.0/bin/tnslsnr LISTENER -inherit 

oracle@phamrdb1: /home/oracle> ps -ef | grep tnslsnr| grep -v grep
oracle   38300     1  0 Oct01 ?        06:21:54 /oracle/product/11.2.0/bin/tnslsnr LISTENER_PHAMR –inherit


名稱欄目:Oracle監(jiān)聽的靜態(tài)注冊(cè)和動(dòng)態(tài)注冊(cè)-創(chuàng)新互聯(lián)
文章路徑:http://weahome.cn/article/iecjg.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部