MSSQL2008R2 Link ORACLE 11:
To create a link:
exec sp_addlinkedserver ' dblink_oracl ', ' ORACLE ', ' msdaora ', ' ORCL120 '
Where ORACL120 is the local installation of the Oracle driver, after Tnsnames.ora configured the link string operation, and to be tested with a sqlgate similar tool passed.
ORACLE driver, you can install the thin installation package on the Web, I am a 32-bit system.
exec sp_addlinkedsrvlogin ' Dblink_oracl ', ' false ', NULL, ' user ', ' Userps '
Perform:
SELECT * FROM OPENQUERY (dblink_oracl, ' select Sysdate from dual ');
SELECT * FROM OPENQUERY (dblink_oracl, ' select Manufactureno from User.sample '); note the picture format do not expect Oracle to automatically convert to MSSQL
Insert:
ORACLE fetch, inserted into SQL Server:
Insert into Dhm40 (DHPSDM, DHPSSM)
SELECT * FROM OPENQUERY (Dblink_oracl, ' SELECT DISTINCT TRIM (BC. Color_code), TRIM (BC. color_cname) from brandcolor BC WHERE BC. Bran_code like '%1% ') ' to be fulfilled '.
To delete a link:
Exec sp_droplinkedsrvlogin Dblink_oracl,null
EXEC sp_dropserver Dblink_oracl
SQL Server 2008 links to ORACLE 11