I have written a class for connecting to Oracle database using ServiceName
in the below format.
connection = DriverManager.getConnection("jdbc:oracle:thin:username/password@//host:port/serviceName);
Is it possible to do the same using SID
?
What I want to achieve is to convert the below 3 connection parameters in the getConnection
method to a single parameter like the above code.
connection = DriverManger.getConnection("jdbc:oracle:thin:@host:port:SID", username, password);
Thanks in advance:)