title: Linking Oracle with SQL Server
body: <p>I'm trying to link SQL Server 2005 to an Oracle 10g database.  I've installed the Oracle client on the SQL server and validated that I can connect to the Oracle database using both tnsping and sqlplus.  When I try to run a query in SQL Server I get the following:</p>
  
  <p><code>OLE DB provider "OraOLEDB.Oracle" for linked server "ORA_CSSA2APD" returned message "ORA-12154: TNS:could not resolve the connect identifier specified".<br>
  Msg 7303, Level 16, State 1, Line 1<br>
  Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "ORA_CSSA2APD".</code></p>
  
  <p>Any ideas?  I've tried both of the following queries with no luck:</p>
  
  <p><code>select * from openquery(ORA_CSSA2APD, 'select count(rowid) from eservice_op.agent')</code></p>
  
  <p><code>select count(rowid) from ORA_CSSA2APD..eservice_op.agent</code></p>