Mike,<br>
<br>
I had a battle setting this up, but got there in the end. Haven't got the script in front of me, but ...<br>
<br>
a) sp_addlinkedserver @server='OracleLinkedDB' @srvproduct='Oracle' @provider='MSDASQL' @provstr='DSN=<OracleODBCDSN>;UID=;PWD=;'<br>
<br>
b) sp_addlinkedsrvlogin @rmtsrvname='OracleLinkedDB' @useself=false @rmtuser='<OracleUser>' @rmtpassword='<OraclePassword>'<br>
<br>
[I believe the Oracle user needs DBA privileges, but not certain!]<br>
<br>
Oracle select statements must be entirely in uppercase for this to work, so, to select current users (assuming synonym is set up) ...<br>
<br>
SELECT * FROM ORACLELINKEDDB..ORACLEUSER.V$SESSION<br>
<br>
should work. If you get an error message referring to incorrect property settings, the remote query timeout option is set too low. I just set mine to 0, as follows :<br>
<br>
sp_configure @configname='remote query timeout (s)' @configvalue=0<br>
go<br>
reconfigure<br>
go<br>
<br>
I'll double-check this info when I'm back in the office tomorrow.<br>
<br>
Mark.