oracle DBLink sqlserver

aishu521發表於2012-08-20

1,安裝getway 並配置以下檔案
  D:\oracle\product\10.2.0\tg_1\tg4msql\admin\inita24ict.ora
內容修改:
   HS_FDS_CONNECT_INFO="SERVER=10.182.15.67;DATABASE=ictdb"
   HS_FDS_TRACE_LEVEL=OFF
  D:\oracle\product\10.2.0\tg_1\NETWORK\ADMIN\listener.ora
  修改內容如下:
  SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = a24ict)
      (ORACLE_HOME = D:\oracle\product\10.2.0\tg_1)
      (PROGRAM = tg4msql)
    )
    (SID_DESC =
      (SID_NAME = icttest)
      (ORACLE_HOME = D:\oracle\product\10.2.0\tg_1)
      (PROGRAM = tg4msql)
    )
  )
 
 LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.15.67)(PORT = 1521))
    )
  )
2,檢查監聽是否啟動
  TNSLSNR.exe
 
3配置 tnsnames.ora
A24ICT =

  (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.15.69)(PORT = 1521))

    (CONNECT_DATA = (SID = a24ict))  (HS = OK)

   )
[oracle@zdttest admin]$ tnsping 10.182.15.69

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 07-OCT-2011 11:05:36

Copyright (c) 1997, 2005, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora

Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=10.182.15.69))(ADDRESS=

(PROTOCOL=TCP)(HOST=10.1
82.15.69)(PORT=1521)))
OK (10 msec)

SQL> create public database link ink_ict69
  2   connect to  sa identified by admin
  3  using 'A24ICT';

  SQL> select * from  Fluke_table@ink_ict69 where rownum=1;

Partnum              Revision   Work_Order           Line_id    Operator
-------------------- ---------- -------------------- ---------- ---------------
No                   Fixture              Instrument
-------------------- -------------------- --------------------
Barcode                        Result     ACVoltage  AmpHi      AmpLow
------------------------------ ---------- ---------- ---------- ----------
Frequency       FreqHi          FreqLow         TestDate TestTi
--------------- --------------- --------------- -------- ------
FSAP304              A          WS8-B20313           P2B23      ???
F0727152             SGGFSAP304-28        20
C4614042PPLDHWWA9              PASS       99.441     150.000    77.500
1012.504        1200.000        800.000         20110930 124231

OK!

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

相關文章