How to supply DB connection properties along with JDBC URL when we used Oracle thin driver
Oracle has a very good documentation on that point.
It boils down to:
Create a Properties
file, add the connection properties you need and add them into your call to
getConnection(String URL, Properties info);
Given your comment, you could try the following - but I could find no documentation that this connection property is actually available on the thin driver. This document that points to that driver suggests it's part of the deprecated weblogic oracle driver.
Properties p = new Properties();
p.setProperty ("user", youruser);
p.setProperty ("password", yourpass);
p.setProperty("EnableCancelTimeout", "true");
Connection con = DriverManager.getConnection(jdbc:oracle:thin:@<host>:1521:<SID>), p);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With