title: Issue connecting Oracle 11g to SQL Server 2012 -- ORA-12523: TNS:listener could not find instance appropriate for the client connection
body: <p>I have Oracle 11g and SQL Server 2012 installed on the same virtual machine. OS is Windows Server 2012. I want to access SQL Server 2012 from Oracle. I created the machine a few days back to test the connection process before applying it on server. </p>
  
  <p>I had come through several issues but now I am stuck with this one. </p>
  
  <p><strong>ORA-12523: TNS:listener could not find instance appropriate for the client
  connection</strong></p>
  
  <p>I have already created ODBC Connection by the name of <strong>sqldb</strong>.</p>
  
  <p><strong>kshaz</strong> is my machine name.</p>
  
  <p>Following are my configuration details.</p>
  
  <p><strong>listener.ora file</strong></p>
  
  <pre><code># listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
  # Generated by Oracle configuration tools.
  
  SID_LIST_LISTENER =
    (SID_LIST =
      (SID_DESC =
        (SID_NAME = CLRExtProc)
        (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
        (PROGRAM = extproc)
        (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
      )
      (SID_DESC =
        (SID_NAME = sqldb)
        (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
        (PROGRAM = hsodbc)
      )
    )
  
  LISTENER =
    (DESCRIPTION_LIST =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = kshaz)(PORT = 1521))
      )
    )
  
  ADR_BASE_LISTENER = C:\app\Administrator
  
  DIRECT_HANDOFF_TTC_LISTENER = OFF
  </code></pre>
  
  <p><strong>tnsnames.ora file</strong></p>
  
  <pre><code>LISTENER_ORCL =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  
  
  ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      )
      (CONNECT_DATA =
        (SID = CLRExtProc)
        (PRESENTATION = RO)
      )
    )
  
  ORCL =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (CONNECT_DATA =
        (SERVER = DEDICATED)
        (SERVICE_NAME = orcl)
      )
    )
  SQLDB =
   (DESCRIPTION =
     (ADDRESS_LIST =
       (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
     )
   (CONNECT_DATA =
     (SERVICE_NAME = sqldb)
   )
  )
  </code></pre>
  
  <p><strong>sqlnet.ora file</strong></p>
  
  <pre><code>SQLNET.AUTHENTICATION_SERVICES= (NTS)
  
  NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
  </code></pre>
  
  <p><strong>initsqldb.ora file</strong></p>
  
  <pre><code>HS_FDS_CONNECT_INFO = sqldb
  HS_FDS_TRACE_LEVEL = off
  </code></pre>
  
  <p>I am running the following query.</p>
  
  <pre><code>select * from emptest@sqld
  </code></pre>
  
  <p><strong>emptest</strong> is the table created at SQL Server 2012 and <strong>SQLD</strong> is the public database link.                      </p>
  
  <p>Where have I gone wrong with the configuration? Or if there is any step that I have missed?</p>
  
  <p>Thank you.</p>