Resolve Oracle ORA-12505, Tns:listener does not currently know of SID given in Connect

Source: Internet
Author: User

The complete error message is as follows:


Java.sql.SQLException:Listener refused the connection with the following error:ora-12505, Tns:listener does not currently Know of SID given in connect descriptorthe Connection descriptor used by the client WAS:192.168.149.128:1521:ORCL at ORAC Le.jdbc.driver.DatabaseError.throwSqlException (databaseerror.java:112) at Oracle.jdbc.driver.DatabaseError.throwSqlException (databaseerror.java:261) at Oracle.jdbc.driver.T4CConnection.logon (t4cconnection.java:387) at Oracle.jdbc.driver.physicalconnection.<init > (physicalconnection.java:414) at oracle.jdbc.driver.t4cconnection.<init> (t4cconnection.java:165) at Oracle.jdbc.driver.T4CDriverExtension.getConnection (t4cdriverextension.java:35) at Oracle.jdbc.driver.OracleDriver.connect (oracledriver.java:801) at Oracle.eclipse.tools.database.connectivity.db.OracleJDBCConnection.createConn (oraclejdbcconnection.java:199) at Oracle.eclipse.tools.database.connectivity.db.OracleJDBCConnection.createConnection (Oraclejdbcconnection.java : 149) at org. Eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection (driverconnectionbase.java:104) at Org.eclipse.datatools.connectivity.DriverConnectionBase.open (driverconnectionbase.java:53) at Org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open (jdbcconnection.java:72) at Oracle.eclipse.tools.database.connectivity.db.OracleJDBCConnectionFactory.createConnection ( ORACLEJDBCCONNECTIONFACTORY.JAVA:42) at Org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection ( connectionfactoryprovider.java:83) at Org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection (connectionprofile.java:355) at Org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection (pingjob.java:76) at Org.eclipse.datatools.connectivity.ui.PingJob.run (pingjob.java:59) at Org.eclipse.core.internal.jobs.Worker.run ( WORKER.JAVA:55)

Workaround:

Open Oracle's Listener.ora file:

(Oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora)

Before modification:

# Listener.ora Network Configuration File:/app/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = Plsextproc)
(Oracle_home =/app/oracle/oracle/product/10.2.0/db_1)
(program = Extproc)
)
)

LISTENER =
(Description_list =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP) (HOST = suse10.site) (PORT = 1521))
)
)

--------------------------------------------------------------------------------------------------------------- ---------------

After modification:

# Listener.ora Network Configuration File:/app/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora# Generated by Oracle configuration tools. Sid_list_listener =  (sid_list = (    Sid_desc =      (sid_name = Plsextproc)      (oracle_home =/app/oracle/oracle /product/10.2.0/db_1) (Program      = extproc)    )    (Sid_desc =
ORCL
(Oracle_home =/app/oracle/oracle/product/10.2.0/db_1)
ORCL)
) LISTENER = (description_list = ( DESCRIPTION = ( ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1)) (ADDRESS = (PROTOCOL = TCP) (HOST = suse10.site) (PORT = 1521)) )

The red text above is the added content. (ORCL--Is your SID database name)

Restart the Oracle listener.

Resolve Oracle ORA-12505, Tns:listener does not currently know of SID given in Connect

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.