Ora-12505 error while starting new connection

oracleoracle-11g

I got this error while starting new connection in Oracle 11g:

Listern refused the connection with the follwoing error: ORA-12505,TNS: Listner does not currently know of SID given in connect descriptor
the connection descriptor used by the client was: localhost:1521:xe

What is the SID and how can I fix the error?

Best Answer

The SID in this case is XE (think of the SID being the database name). The Error means that the listener is not configured to listen for a database called XE on port 1521 on server localhost. Unless you are running the client and server on the same box localhost isn't likely to be correct - change this to the server name. This looks like a connection to Oracle XE which isn't available for 11g (yet) so it isn't clear what your set-up is exactly and so it is difficult to provide a definitive answer - but most likely wither the database is down or you are connecting to the wrong server.