use master
EXEC sp_addlinkedserver
@server = '<LINK SERVER NAME>',
@srvproduct = 'Oracle',
@provider = 'MSDAORA', -- or your prefs...
@datasrc = '<INSTANCE>'
/* Thus, SQL Server calls the server LINK SERVER NAME, and SQL*NET
references the server as <INSTANCE> found in TNS. */
-- You need a login, also.
exec sp_addlinkedsrvlogin '<INSTANCE>', false, 'sa', '<SCHEMA>', 'PASSWORD
TO ORACLE'
/* Log in to SQL Server as sa, which will map to the <SCHEMA> account on
Oracle. */
Watch your case. It matters.
-- chip
MS Sql Server LazyDBA home page