ORA-12505 connection refuse solution and summary
Oracle
Problem description:
The following error occurs when you connect to the Oracle 10.2.0.1.0 database using JDBC today:
Connection refused (description = (TMP =) (vsnnum = 153093120) (ERR = 12505) (error_stack = (error = (code = 12505) (emfi = 4 ))))
You can directly connect to the database through PLSQL, or connect to the database through sqlplus.
After debugging and searching for relevant information, the cause of the problem is as follows:
When connecting to the database through JDBC, you must use the database's sid_name instead of the database's services_name.
When using PLSQL to connect to the database, you only need the services_name of the database. Therefore, modify the services_name in the connection string to sid_name.
Appendix:
View the current Sid in the database:
SQL> select instance_name from V $ instance;
Instance_name
----------------
HASL
I have encountered this problem before and found a solution, but today I have been suffering for a long time, finally, we found that we have made a record in the local device .................
The same problem happened twice and was also entangled for several hours ...............
Avoid similar errors in the future .............