Oracle JDBC connection string formats¶
The Oracle JDBC Thin driver provides specific formats for connection strings depending on whether the target database is identified by a SID (System Identifier) or a Service Name^[600-developer__database__oracle__oracle-record.md].
Syntax¶
The connection string follows the jdbc:oracle:thin:@host:port:key pattern^[600-developer__database__oracle__oracle-record.md].
Using SID¶
When connecting using the SID, the syntax separates the port and the identifier with a colon (:)^[600-developer__database__oracle__oracle-record.md].
jdbc:oracle:thin:@DB.PF2DEV1-OOB.COM:1521:sid
Using Service Name¶
When connecting using the Service Name, the syntax separates the port and the identifier with a forward slash (/)^[600-developer__database__oracle__oracle-record.md].
jdbc:oracle:thin:@DB.PF2DEV1-OOB.COM:1521/serviceName