Oracle DBLink(투명 게 이 트 웨 이)

3529 단어 Oacle
Oracle DB Link 에서 사 용 했 던 두 가지(Gateway/Gateway for ODBC)
Oracle 투명 게 이 트 웨 이 다운로드 주소:http://download.oracle.com/ot...
Oracle 공식 문서:http://docs.oracle.com/cd/E11...
Oracle 11g 여러 sqlserver 연결
공식 문서 참조
1.tg 설정1 initdg4msql.ora 여러 개의 Sqlserver 에 연결 하려 면 여러 개의 initdg4msql.ora 파일 을 설정 해 야 합 니 다.
[sql] view plaincopy
D:appAdministratorproduct11.2.0tg_1dg4msqladmin
copy initdg4msql.ora initdg4msql1.ora
copy initdg4msql.ora initdg4msql2.ora
Change the value of the HS_FDS_CONNECT_INFO parameter in the new files.
For initdg4msql1.ora, enter the following:
HS_FDS_CONNECT_INFO=192.168.1.225//DB1 HS_FDS_TRACE_LEVEL=OFF HS_FDS_RECOVERY_ACCOUNT=RECOVER HS_FDS_RECOVERY_PWD=RECOVER For initdg4msql2.ora, enter the following:
HS_FDS_CONNECT_INFO=192.168.1.225//DB2 HS_FDS_TRACE_LEVEL=OFF HS_FDS_RECOVERY_ACCOUNT=RECOVER HS_FDS_RECOVERY_PWD=RECOVER
2.tg 설정1 LISTENER
D:appAdministratorproduct11.2.0tg_1NETWORKADMIN
listener.ora
[sql] view plaincopySID_LIST_LISTENER = (SID_LIST =
 (SID_DESC =   
   (SID_NAME = dg4msql1)        
   (ORACLE_HOME = D:\app\Administrator\product\11.2.0\tg_1)  
   (PROGRAM = dg4msql)     
 )   
 (SID_DESC =   
   (SID_NAME = dg4msql2)        
   (ORACLE_HOME = D:\app\Administrator\product\11.2.0\tg_1)  
   (PROGRAM = dg4msql)     
 )   

)
LISTENER = (DESCRIPTION_LIST =
(DESCRIPTION =  
  (ADDRESS = (PROTOCOL = TCP)(HOST = digiocto)(PORT = 1522))  
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))  
)  

)
ADR_BASE_LISTENER = D:appAdministratorproduct11.2.0tg_tg 설정1 tnsnames.ora
[sql] view plaincopyLISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
dg4msql1 = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))  
(CONNECT_DATA =(SID = dg4msql1))  
(HS=OK)  

)
dg4msql2 = (DESCRIPTION=
(ADDRESS = (PROTOCOL = tcp)(HOST = localhost)(PORT = 1522))  
(CONNECT_DATA=(SID = dg4msql2))  
(HS=OK)  

)4.dbhome 증가1 tnsnames.ora
[sql] view plaincopydg4msql1 = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))  
(CONNECT_DATA =(SID = dg4msql1))  
(HS=OK)  

)
dg4msql2 = (DESCRIPTION=
(ADDRESS = (PROTOCOL = tcp)(HOST = localhost)(PORT = 1522))  
(CONNECT_DATA=(SID = dg4msql2))  
(HS=OK)  

) 5.Restart dbhome1 、tg_1 의 LISTENER
6.Create DB Link
[sql] view plaincopyCREATE PUBLIC DATABASE LINK MSQL1 CONNECT TO "sa" IDENTIFIED BY "passwd1" USING 'dg4msql1'; [sql] view plaincopyCREATE PUBLIC DATABASE LINK MSQL2 CONNECT TO "sa" IDENTIFIED BY "passwd2" USING 'dg4msql2'; 7.TEST Connection
[sql] view plaincopySQL> SELECT * FROM ALL_USERS@MSQL1; SQL> SELECT * FROM ALL_USERS@MSQL2;
Oracle DBLink(透明网关)_第1张图片

좋은 웹페이지 즐겨찾기