The following were the steps we took to create a Linked Server from SQL Server 2000 to Oracle 8i.
- Install the Oracle client on the SQL Server host machine.
- Do this registry edit (for Microsoft Windows 2000):
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSDTCMTxOCI] "OracleXaLib"="oraclient8.dll" "OracleSqlLib"="orasql8.dll" "OracleOciLib"="oci.dll"
- Create an ODBC Data Source to Oracle:
System DSN -> Add Oracle ODBC driver Data Source Name = (Oracle Connect String - ex. ORACLE_PROD) Description = (Oracle Connect String - ex. ORACLE_PROD) Service Name = (Oracle Connect String - ex. ORACLE_PROD) UserID = sqldba (Oracle User ID)
- Set up the Linked Server:
Provider Name = Microsoft OLE DB Provider for Oracle Product Name = (leave blank) Data Source = (DSN Name from step 3) Provider string = MSDAORA
Select * from ORACLE_PROD..(Database Schema).(Table Name)
Vlada B. writes: This is a great tip! I'll be sure to pass this along.
Mary C. writes: The accuracy of the tip is right on target. However, for an enterprise setup, this is giving a loaded gun to folks. Our experience with Oracle clients on our already overloaded SQL Server database servers has resulted in poorer performance and in some cases, eventual blue screens. Microsoft has lots of nice features for jobs on development boxes but it wrecks havoc on our larger, shared enterprise servers. Even they say that a database server should remain only a database server (no extraneous files, clients, etc) if you want to get the best throughput and minimize problems.