Skip to Main Content

Java and JavaScript in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why doesn't OracleDriver.getPropertyInfo() return the host, port, or SID?

796765Feb 24 2011
The [getPropertyInfo() method|http://download.oracle.com/javase/6/docs/api/java/sql/Driver.html#getPropertyInfo(java.lang.String,%20java.util.Properties)] of a JDBC driver is meant to parse a given JDBC URL for all relevant information. However when I call it on the 11.2.0.2.0 version of the ojdbc5 driver, with this URL:

jdbc:oracle:thin:@myHost:666:mySID

... all I get are these properties (none of which are the host, port, or SID):

oracle.jdbc.RetainV9LongBindBehavior = 'false'
user = 'null'
database = 'null'
autoCommit = 'true'
protocol = 'null'
oracle.jdbc.StreamChunkSize = '16384'
SetFloatAndDoubleUseBinary = 'false'
oracle.jdbc.ocinativelibrary = 'null'
v$session.terminal = 'unknown'
v$session.machine = 'null'
v$session.osuser = 'null'
v$session.program = 'JDBC Thin Client'
v$session.process = '1234'
v$session.iname = 'jdbc_ttc_impl'
v$session.ename = 'null'
oracle.net.profile = 'null'
oracle.net.authentication_services = 'null'
oracle.net.kerberos5_mutual_authentication = 'null'
oracle.net.kerberos5_cc_name = 'null'
oracle.net.encryption_client = 'null'
oracle.net.encryption_types_client = 'null'
oracle.net.crypto_checksum_client = 'null'
oracle.net.crypto_checksum_types_client = 'null'
oracle.net.crypto_seed = 'null'
oracle.jdbc.TcpNoDelay = 'false'
oracle.jdbc.ReadTimeout = 'null'
oracle.net.CONNECT_TIMEOUT = 'null'
oracle.net.disableOob = 'false'
oracle.net.useZeroCopyIO = 'true'
oracle.net.SDP = 'false'
oracle.jdbc.use1900AsYearForTime = 'false'
oracle.jdbc.timestampTzInGmt = 'true'
oracle.jdbc.timezoneAsRegion = 'true'
oracle.net.ssl_server_dn_match = 'null'
oracle.net.ssl_version = 'null'
oracle.net.ssl_cipher_suites = 'null'
javax.net.ssl.keyStore = 'null'
javax.net.ssl.keyStoreType = 'null'
javax.net.ssl.keyStorePassword = 'null'
javax.net.ssl.trustStore = 'null'
javax.net.ssl.trustStoreType = 'null'
javax.net.ssl.trustStorePassword = 'null'
ssl.keyManagerFactory.algorithm = 'null'
ssl.trustManagerFactory.algorithm = 'null'
oracle.net.oldSyntax = 'null'
java.naming.factory.initial = 'null'
java.naming.provider.url = 'null'
java.naming.security.authentication = 'null'
java.naming.security.principal = 'null'
java.naming.security.credentials = 'null'
oracle.net.wallet_location = 'null'
oracle.net.wallet_password = 'null'
oracle.jdbc.proxyClientName = 'null'
oracle.jdbc.useNio = 'false'
JDBCDriverCharSetId = 'null'
oracle.jdbc.editionName = 'null'
internal_logon = 'null'
oracle.jdbc.createDescriptorUseCurrentSchemaForSchemaName = 'false'
OCISvcCtxHandle = '0'
OCIEnvHandle = '0'
OCIErrHandle = '0'
prelim_auth = 'false'
OCINewPassword = 'null'
defaultExecuteBatch = '1'
defaultRowPrefetch = '10'
oracle.jdbc.defaultLobPrefetchSize = '4000'
oracle.jdbc.enableDataInLocator = 'true'
oracle.jdbc.enableReadDataInLocator = 'true'
remarksReporting = 'false'
includeSynonyms = 'false'
restrictGetTables = 'false'
AccumulateBatchResult = 'true'
useFetchSizeWithLongColumn = 'false'
processEscapes = 'true'
fixedString = 'false'
defaultNChar = 'false'
RessourceManagerId = '0000'
disableDefineColumnType = 'false'
oracle.jdbc.convertNcharLiterals = 'false'
oracle.jdbc.J2EE13Compliant = 'false'
oracle.jdbc.mapDateToTimestamp = 'true'
oracle.jdbc.useThreadLocalBufferCache = 'false'
oracle.jdbc.driverNameAttribute = 'null'
oracle.jdbc.maxCachedBufferSize = '30'
oracle.jdbc.implicitStatementCacheSize = '0'
oracle.jdbc.LobStreamPosStandardCompliant = 'false'
oracle.jdbc.getObjectReturnsXMLType = 'false'
oracle.jdbc.strictASCIIConversion = 'false'
oracle.jdbc.thinForceDNSLoadBalancing = 'false'
password = 'null'
server = 'null'
oracle.jdbc.commitOption = 'null'

Why does the driver not provide these three basic properties? It works nicely with the jTDS driver for SQL Server, for example.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2011
Added on Feb 24 2011
0 comments
1,110 views