[20211020]XXXX_DGB服務名.txt

lfree發表於2021-10-20

[20211020]XXXX_DGB服務名.txt

--//當使用DGMGRL管理dg時,會建立如下兩個服務XXXX_DGB,XXXX_DGMGRL.昨天配置是不小心犯了一個小錯誤做一個記錄。

$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 20-OCT-2021 09:30:48
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.aaa.bbb)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                20-OCT-2021 09:27:37
Uptime                    0 days 0 hr. 3 min. 11 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.3/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.2.0.3/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.aaa.bbb)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "xxx999XDB" has 1 instance(s).
  Instance "xxx999dg2", status READY, has 1 handler(s) for this service...
Service "xxx999dg2" has 2 instance(s).
  Instance "xxx999dg2", status UNKNOWN, has 1 handler(s) for this service...
  Instance "xxx999dg2", status READY, has 1 handler(s) for this service...
Service "xxx999dg2_DGB" has 2 instance(s).
  Instance "xxx999dg2", status UNKNOWN, has 1 handler(s) for this service...
  Instance "xxx999dg2", status READY, has 1 handler(s) for this service...
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Service "xxx999dg2_DGMGRL" has 1 instance(s).
  Instance "xxx999dg2", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

--//xxx999dg2_DGB 服務名存在兩個一個動態註冊,一個靜態註冊。靜態註冊是我寫在監聽配置檔案裡面,為什麼還存在一個動態註冊的
--//服務名呢?

SYS@xxx999dg2> show parameter service
NAME          TYPE   VALUE
------------- ------ ---------
service_names string xxx999dg2

--//僅僅存在一個服務名xxx999dg2。

SYS@xxx999dg2> select name from DBA_SERVICES;
NAME
--------------------
SYS$BACKGROUND
SYS$USERS
xxx999XDB
xxx999
--//也不存在xxx999dg2_DGB服務名。

--//找到一個連結:http://blog.itpub.net/20747382/viewspace-2130664/ =>_DGMGRL and _DGB
Note:  Static entries are only used by the Broker itself via the Broker defined StaticConnectIdentifier property.  They
are NEVER to be used for any other purpose by the user.  This includes using it for the normal DGConnectIdentifier, RMAN
connections or anything else.  Also note that you must never define a static entry for the Broker 'DGB' service.  That
service is for the Broker exclusive use.  Also note that using the "_DGMGRL" or "_DGB" in your TNSNAMES definition is
expressly forbidden.

注意:靜態條目僅透過代理定義的靜態連線識別符號屬性使用。使用者絕不會將它們用於任何其他目的。這包括使用它用於正常的DG聯結器標
識符、RMAN連線或其他任何東西。還要注意,您永遠不能為代理"DGB"服務定義靜態條目。這項服務是為經紀人獨家使用的。還要注意,
在您的名稱定義中,使用"_DGMGRL"或"_DGB"是明確禁止的。

--//可以發現提示永遠不能為代理"DGB"服務定義靜態條目,這項服務是為經紀人獨家使用的。
--//也就是根本不需要配置xxx999dg2_DGB服務為靜態註冊。在監聽檔案中註解這部分內容。

$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 20-OCT-2021 16:33:24
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.aaa.bbb)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                20-OCT-2021 10:53:09
Uptime                    0 days 5 hr. 40 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.3/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.2.0.3/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.aaa.bbb)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "xxx999XDB" has 1 instance(s).
  Instance "xxx999dg2", status READY, has 1 handler(s) for this service...
Service "xxx999dg2" has 2 instance(s).
  Instance "xxx999dg2", status UNKNOWN, has 1 handler(s) for this service...
  Instance "xxx999dg2", status READY, has 1 handler(s) for this service...
Service "xxx999dg2_DGB" has 1 instance(s).
  Instance "xxx999dg2", status READY, has 1 handler(s) for this service...
Service "xxx999dg2_DGMGRL" has 1 instance(s).
  Instance "xxx999dg2", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

--//xxx999dg2_DGB 這個服務非常特殊,只要使用DGMGRL就存在並且建立一個動態服務名。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2838384/,如需轉載,請註明出處,否則將追究法律責任。

相關文章