この記事は約9分42秒で読むことができます。

sql oracle 静的サービス登録と動的サービス登録

静的サービス登録

静的サービス登録とは、あらかじめlistener.oraに接続を中継するインスタ
ンスの情報を記述しておくインスタンスの登録方法のこと。

動的サービス登録

動的サービス登録とは、リスナーが接続を中継するインスタンスの情報を
動的にメンテナンスする登録方法のこと。

動的サービス登録のプロセス

リスナーへの動的サービス登録は、PMON(Oraclellg以前)、またはLREG(Oraclel2c以降)が実行。


[oracle@c75932116d78 ~]$ vi /opt/oracle/product/18c/dbhome_1/network/admin/listener.ora

LISTENER =
(DESCRIPTION_LIST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
  )
)

DEDICATED_THROUGH_BROKER_LISTENER=ON
DIAG_ADR_ENABLED = off


SELECT * FROM v$parameter WHERE NAME LIKE '%' || LOWER('SERVICE') || '%';

SELECT * FROM v$spparameter WHERE NAME LIKE '%' || LOWER('SERVICE') || '%';

SELECT * FROM v$parameter WHERE NAME LIKE '%' || LOWER('INSTANCE_NAME') || '%';

SELECT * FROM v$spparameter WHERE NAME LIKE '%' || LOWER('INSTANCE_NAME') || '%';

動的サービス登録を行うリスナーの指定

リスナーへの動的サービス登録は、PMON(Oraclellg以前)、またはLREG(Oraclel2c以降)が実行。


[oracle@c75932116d78 ~]$ find / -name *para* -type f 2>/dev/null
/etc/sysconfig/oracle-database-preinstall-18c/oracle-database-preinstall-18c.param
/opt/oracle/product/18c/dbhome_1/rdbms/admin/parameters.properties
/opt/oracle/product/18c/dbhome_1/rdbms/xml/em/image/toolbar_l23_separator.png
/opt/oracle/product/18c/dbhome_1/rdbms/xml/em/orarep/config/param_types.xsd
/opt/oracle/product/18c/dbhome_1/rdbms/xml/em/orarep/config/report_parameters_type.xsd
/opt/oracle/product/18c/dbhome_1/rdbms/xml/em/orarep/config/set_param.xsd
/opt/oracle/product/18c/dbhome_1/rdbms/xml/em/orarep/config/show_params.xsd
/opt/oracle/product/18c/dbhome_1/addnode/addnode_oraparam.ini
/opt/oracle/product/18c/dbhome_1/addnode/addnode_oraparam.ini.sbs
/opt/oracle/product/18c/dbhome_1/clone/clone_oraparam.ini
/opt/oracle/product/18c/dbhome_1/clone/clone_oraparam.ini.sbs
/opt/oracle/product/18c/dbhome_1/cv/remenv/pluggable/check_network_param.sh
/opt/oracle/product/18c/dbhome_1/inventory/Templates/addnode/addnode_oraparam.ini.sbs
/opt/oracle/product/18c/dbhome_1/inventory/Templates/clone/clone_oraparam.ini.sbs
/opt/oracle/product/18c/dbhome_1/inventory/Templates/oui/clusterparam.ini
/opt/oracle/product/18c/dbhome_1/inventory/Templates/oui/oraparam.ini
/opt/oracle/product/18c/dbhome_1/md/admin/sdo_coord_op_param_use.txt
/opt/oracle/product/18c/dbhome_1/md/admin/sdo_coord_op_param_vals.txt
/opt/oracle/product/18c/dbhome_1/md/admin/sdo_coord_op_params.txt
/opt/oracle/product/18c/dbhome_1/oui/clusterparam.ini
/opt/oracle/product/18c/dbhome_1/oui/oraparam.ini

静的サービス登録の確認

リスナー制御ユーテイリテイLSNRCTLのSERVICESコマンドで、リス
ナーに登録されているインスタンス情報を確認することができる。


[oracle@centos7 ~]$ docker exec -it orcl_18cr3 bash
[oracle@c75932116d78 ~]$ lsnrctl

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 19-JAN-2019 18:10:56

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
Services Summary...
Service "7f5425dc31710c7ce053030011ac3d6a" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:22 refused:0 state:ready
         LOCAL SERVER
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:22 refused:0 state:ready
         LOCAL SERVER
Service "ORCLXDB" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER 
         (ADDRESS=(PROTOCOL=tcp)(HOST=c75932116d78)(PORT=34198))
Service "pdb1" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:22 refused:0 state:ready
         LOCAL SERVER
The command completed successfully
LSNRCTL>

Leave a Reply

Your email address will not be published. Required fields are marked *