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)
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
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
If above information does not resolve the issue, kindly follow the below mentioned steps:
  1. Ensure that JDBC driver in provided in javaclasspath.txt
  2. 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!

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!