JDBC Connectivity Issues

using JDBC


conn = DriverManager.getConnection(“jdbc:oracle:thin:@HOST_NAME:PORT:SERVICE_NAME/user=USERNAME,password=PASSWORD”)

JavaCall.JavaCallError(“Error calling Java: java.sql.SQLException: Listener refused the connection with the following errors:\nORA-12505, TNS: listener does not currently know of SID given in connect descriptor\n”).

I cannot find much documentation about fixing this issue within the package. Although I know it is because I am using a service name as opposed to a SID.

Any assistance would be tremendous.



Does the equivalent Java code (ie, with the same connection string) work?

I ended up playing with the connection string:

JDBC.DriverManager.getConnection(“jdbc:oracle:thin:@HOST_NAME:PORT/SERVICE_NAME”, Dict(“user” => “USERNAME”, “password” => “PASSWORD”))

This ended up connecting to my Oracle Database.

Thanks for reaching out.