ORA-12505, TNS: Listener does not currently know of SID given in connect Descriptor

Source: Internet
Author: User

1. Oracle client installation:

The installation of Oracle is not detailed here, and the online installation diagram is also very detailed. After oracle is installed, the Oracle client will be installed. The first choice is to download the client from the official Oracle website, the size is about mb. Here the oracle11g version is used. The decompressed directory structure is as follows:

Click the “setup.exe file to start the installer. For details about the installation configuration, see:

Http://www.cnblogs.com/jiguixin/archive/2011/09/09/2172672.html

2. Start the client tool, sqldeveloper

An error message "ORA-12505, TNS: Listener does not currently know of SID given in connect descriptor" was reported during connect.

The content of the "tnsnames. ora" file is as follows:

XE =  (DESCRIPTION =    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))    (CONNECT_DATA =      (SERVER = DEDICATED)      (SERVICE_NAME = XE)    )  )EXTPROC_CONNECTION_DATA =  (DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))    )    (CONNECT_DATA =      (SID = PLSExtProc)      (PRESENTATION = RO)    )  )ORACLR_CONNECTION_DATA =   (DESCRIPTION =     (ADDRESS_LIST =       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))     )     (CONNECT_DATA =       (SID = CLRExtProc)       (PRESENTATION = RO)     )   ) 

The content of "listener. ora" is as follows:

SID_LIST_LISTENER =  (SID_LIST =    (SID_DESC =      (SID_NAME = PLSExtProc)      (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)      (PROGRAM = extproc)    )    (SID_DESC =      (SID_NAME = CLRExtProc)      (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)      (PROGRAM = extproc)    )  )LISTENER =  (DESCRIPTION_LIST =    (DESCRIPTION =      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))    )  )DEFAULT_SERVICE_LISTENER = (XE)

3. solution:

I found a lot on the internet, tried a lot, and finally found the corresponding solution:

Modify the content of the "listener. ora" file:

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = plsextproc)
(ORACLE_HOME = c: \ oraclexe \ app \ oracle \ product \ 11.2.0 \ Server)
(Program = EXTPROC)
)
(Sid_desc =
(Sid_name = clrextproc)
(ORACLE_HOME = c: \ oraclexe \ app \ oracle \ product \ 11.2.0 \ Server)
(Program = EXTPROC)
)
(Sid_desc =
(Sid_name = Xe)
(ORACLE_HOME = c: \ oraclexe \ app \ oracle \ product \ 11.2.0 \ Server)
(Global_dbname = Xe)
)

)

Listener =
(Description_list =
(Description =
(Address = (Protocol = IPC) (Key = extproc1 ))
(Address = (Protocol = TCP) (host = localhost) (Port = 1521 ))
)
)

Default_service_listener = (xe)

The red part is the newly added content. After the Oracle service is restarted, sqldeveloper can successfully connect to the database instance.

References:

Http://samfeng.blog.51cto.com/52272/774543

Http://www.cnblogs.com/simie/archive/2007/06/03/769312.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.