Is it possible to set `oracle.net.encryption_client` property purely in JDBC connection URL?

Viewed 1314

Is it possible to set oracle.net.encryption_client property purely in JDBC connection URL?

I can see that the property can be set via properties parameter of DriverManager.getConnection(url, props). But is it at all possible to pass the parameters in the URL string, specifically, for Oracle JDBC driver with Thin client?

If it is not possible to set this using the JDBC URL, is it possible to set this property globally for Java application?

1 Answers

(1) Yes, you can set it as a system property. -Doracle.net.encryption-client=...

(2) You can set it as a connection property as well. Check out the https://docs.oracle.com/en/database/oracle/oracle-database/18/jajdb/oracle/jdbc/OracleConnection.html#CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL Also, check the sample DataSourceSample.java to see how to pass the connection properties.

(3) We do allow properties as part of the URL from 19c version. But, this property is not allowed in the URL. Check out the EasyConnect Plus for more details.

Related