oracle和sqlserver互訪(3)

jss001發表於2009-02-26
3.SQLSERVER訪問ORACLE
環境:windowsxp + sqlserver2000 + Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production IP:192.168.1.221
程式碼:

// A. 新增ODBC,OdbcName=DB,OracleSid=DB

// B. 執行
sp_addlinkedserver 'LIORA', 'Oracle', 'MSDAORA', 'DB'GO

EXEC sp_addlinkedsrvlogin
@rmtsrvname='LIORA',@useself='false',@locallogin='sa',@rmtuser='SYSTEM',@rmtpassword='MANAGER'

select top 10 topic,info from LIORA..SYSTEM.HELP

topic info
-------------------------------------------------- --------------------------------------------------------------------------------

@
NULL@ @ ("at" sign)

@ -------------

@
NULL@ Runs the SQL*Plus statements in the specified command file. The command@ file can be called from the local file system or from a web server.

@
NULL@ @ {uri|file_name[.ext]} [arg...]

@
NULL@ where uri supports HTTP, FTP and gopher protocols in the form:



(
影響 10 個資料列)

[@more@]

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

相關文章