Why do i get listener refused the connection with the following error: ora-12505, tns:listener does not currently know of sid given in connect descriptor'.
3 views (last 30 days)
Show older comments
Hello I'm using MATLAB 2017b and MATLAB 2020a and i used to be able to connecto to our Oracle database. But when the our Oracle version was updated to Oracle version 11.2.0.4, or 11gR2 I now get the error message:
listener refused the connection with the following error: ora-12505, tns:listener does not currently know of sid given in connect descriptor'.
It's not a database issue because i was able to connect through other programs. I think there is an issue with MATLAB's functions.
Does anyone know why this happens?
Thank you,
Lucas
Answers (1)
Aniket
on 7 May 2025
The error message indicates that the SID or Service name provided is incorrect.
Here is the link to Oracle documentation regarding this error message: https://support.oracle.com/knowledge/Middleware/2926900_1.html
You may also refer to stackoverflow answer for the similar error: https://stackoverflow.com/questions/18192521/ora-12505-tnslistener-does-not-currently-know-of-sid-given-in-connect-descript
If above information does not resolve the issue, kindly follow the below mentioned steps:
- Ensure that JDBC driver in provided in javaclasspath.txt
- Execute below command in MATLAB command window and check if the driver is added to the static java class path.
>> javaclasspath
Also make sure that the syntax is correct while using database command: https://www.mathworks.com/help/database/ug/database.html
I hope this resolves the issue!
0 Comments
See Also
Categories
Find more on Reporting and Database Access in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!