Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORA-12505 When Connecting Using Jdbc. #229

Open
silkPK opened this issue Jul 27, 2023 · 0 comments
Open

ORA-12505 When Connecting Using Jdbc. #229

silkPK opened this issue Jul 27, 2023 · 0 comments

Comments

@silkPK
Copy link

silkPK commented Jul 27, 2023

If the database is a pluggable database (PDB so Multi-Tenant functionality) the client connection fails with ORA-12505.

Error:
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

According to the Oracle Doc ID 2926900.1, connections to a pluggable database use SERVICE_NAME and not SID.

To solve this problem, shall be used the Thin-style Service Name Syntax

@//host_name:port_number/service_name

For example:

jdbc:oracle:thin:scott/tiger@//myhost:1521/myservicename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant