title: What is a TNS:listener in the Context of Oracle?
body: <p>Borderline ServerFault question, but figured I'd try here first since I've had luck with Oracle questions in the past.</p>
  
  <p>I'm trying to connect to an oracle database from PHP, and I'm getting the following error.</p>
  
  <pre><code>ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
  </code></pre>
  
  <p>This is the error that PHP reports, and the error that shows up in Oracle's listener.log.</p>
  
  <p>My immediate problem is fixing this error.  The larger question I'd like answered is how does Oracle connection model work?</p>
  
  <p>This is in a development environment that's running on my local windows machine and has been working up until now.  Unfortunately, the environment was handed to me (I didn't set it up) and the people who <strong>did</strong> set it up are unavailable to help me debug it.  </p>
  
  <p>If I was getting a similar error with MySQL or PostgreSQL (two systems I'm more familiar with), I'd check to ensure that a database process was running, and then attempt to connect manually to the database using the username/password/connection string.  Unfortunately, I'm not familiar with the Oracle tools on windows (other than SQL Developer) and I don't know what a TNS:listener or SID are in the context of Oracle (I have vague ideas, but vague ideas rarely help when you're debugging something like this)</p>
  
  <p>Any general advice would be appreciated.</p>
  
  <p><strong>Updates per Comments:</strong></p>
  
  <p>There's a number of entires in my tnsnames.ora file, the relevant entry being</p>
  
  <pre><code>OBS2 =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = steel-ae39650)(PORT = 1521))
      (CONNECT_DATA =
        (SERVER = DEDICATED)
        (SERVICE_NAME = OBS2)
      )
    )
  </code></pre>
  
  <p>This is not reflected in the list of instances when I run</p>
  
  <pre><code>    LSNRCTL&gt; services
  </code></pre>
  
  <p>So I think my next question is, how do I attempt to manually start up the OBS2 instance?</p>