透明閘道器一些特殊場景的配置

lusklusklusk發表於2017-06-06
問題1:資料庫不方便安裝透明閘道器軟體怎麼辦?
解決方案:在其他資料庫伺服器上安裝透明閘道器軟體,再在本機上新增透明閘道器伺服器的tns別名即可

192.168.21.16不方便安裝透明閘道器伺服器,直接在一臺虛擬機器192.168.128.163上安裝透明閘道器(指向IP為172.16.50.162埠為1433的RPT資料庫),192.168.21.16新增指向192.168.128.163監聽的tns別名資訊即可

192.168.128.163安裝透明閘道器
透明閘道器配置如下
[oracle@localhost admin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/dg4msql/admin
[oracle@localhost admin]$ cat initdg4msql.ora
HS_FDS_CONNECT_INFO=[172.16.50.162]:1433//RPT
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER

靜態監聽配置如下
[oracle@localhost admin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/network/admin
[oracle@localhost admin]$ cat listener.ora
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.128.163)(PORT = 1521))
    )
  )
SID_LIST_LISTENER =
  (SID_LIST =
   (SID_DESC =
      (ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1)
      (SID_NAME = dg4msql)
      (PROGRAM = dg4msql)
    )
  )
ADR_BASE_LISTENER = /u01/app/oracle

監聽資訊如下
[oracle@localhost admin]$ lsnrctl status|grep dg4
Service "dg4msql" has 1 instance(s).
  Instance "dg4msql", status UNKNOWN, has 1 handler(s) for this service...


192.168.21.16新增如下tns資訊
sqlserver162 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.128.163)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dg4msql)
    )
    (HS=OK)
  )










問題2:$ORACLE_HOME和透明閘道器的安裝路徑不一樣,怎麼辦?
解決方案:透明閘道器的監聽配置裡面$ORACLE_HOME寫成實際安裝路徑


[oratst@hqerp1 TST_hqerp1]$ echo $ORACLE_HOME
/u01/TST/db/tech_st/11.2.0

[oratst@hqerp1 ~]$ ll /u01/TST/db/tech_st/gatways/dg4msql/admin/initdg4msql.ora
-rw-r--r-- 1 oratst dba 362 Apr  5 15:31 /u01/TST/db/tech_st/gatways/dg4msql/admin/initdg4msql.ora


靜態監聽的關鍵配置如下
TST =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.31)(PORT = 1571))
    )
  )

SID_LIST_TST =
  (SID_LIST =
    (SID_DESC =
      (ORACLE_HOME= /u01/TST/db/tech_st/11.2.0)
      (SID_NAME = TST)
    )
    (SID_DESC =
      (ORACLE_HOME= /u01/TST/db/tech_st/gatways)
      (SID_NAME = dg4msql)
      (PROGRAM = dg4msql)
    )
  )



Lsnrctl status tst顯示如下資訊
Service "TST" has 1 instance(s).
  Instance "TST", status UNKNOWN, has 1 handler(s) for this service...
Service "dg4msql" has 1 instance(s).
  Instance "dg4msql", status UNKNOWN, has 1 handler(s) for this service...

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

相關文章