ORA-12505 🗃️ SQL

ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

The connect string uses a SID the listener doesn’t know — often a service name passed as SID.

Seen on: SQL

Meaning

JDBC URLs with :SID use host:port:SID; service names need host:port/SERVICE. Pluggable databases are reached by service name.

Common causes

  • Service name used as SID (jdbc:oracle:thin:@host:1521:ORCLPDB1)
  • Wrong SID

⚡ Quick fix

  1. Use the service-name format: jdbc:oracle:thin:@//host:1521/ORCLPDB1
  2. Check lsnrctl status for SIDs/services

Detailed fix by platform

Java

  1. jdbc:oracle:thin:@//db.example.com:1521/ORCLPDB1

How to diagnose

  1. Format — SID (:) or service (/)?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.