solve ORA-12505, tns:listener does not currently know of sid given in connect descriptor in oracle

Resolve ORA-12505, TNS:listener does not currently know of sid given in connect descriptor in oracle.

In this tutorial we will try to find out appropriate solution to ORA-12505, TNS:listener does not currently know of sid given in connect descriptor in oracle.





>>First of all, you must ensure that Connection URL you are using is correct -

CORRECT Connection URL >
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl",
                              "ankit", "Oracle123");

Hostname = localHost,
Port =1521 (default port)
SID= orcl
Username =ankit
Password=Oracle123




>>Then, you must ensure all the Oracle services are up -

In windows, Go to start, run (Windows + r), and type Services.msc

And ensure all the below mentioned services are up, if not, start them manually>

OracleXETNSListener
OracleServiceXE
OracleMTSRecoveryService
OracleOraDb11g_home1ClrAgent
OracleOraDb11g_home1TNSListener
OracleServiceORCL



Now, your Oracle database is up, and will resolve ORA-12505, TNS:listener does not currently know of sid given in connect descriptor error in Oracle.


If you still facing any problem, or if it does not solve your problem completely, please comment below.

No comments:

Post a Comment