Formato de Driver Oracle JDBC
Oracle JDBC – como servicio:
Oracle JDBC – como SID:
Note: Support for SID is being phased out. Oracle recommends that users switch over to using service names.
Oracle JDBC Thin using a TNSName:
Note: Support for TNSNames was added in the driver release 10.2.0.1
Formato de Driver Oracle JDBC OCI
The Oracle JDBC driver provides properties that can be specified when connecting to the database. Listed below are some examples of these properties.
To specify properties in the JDBC connection, you can use a Java Properties object, and pass that object into the JDBC getConnection method. For example:
java.util.Properties info = new java.util.Properties();
Connection conn = DriverManager.getConnection (url, info);
internal_logon: Use this property to connect as a sysoper or sysdba role. When using this property, the user and password properties must be included in the properties object. For example:
Properties props = new Properties();
Connection conn = DriverManager.getConnection (url, props);
defaultRowPrefetch: Oracle JDBC drivers allow you to set the number of rows to prefetch from the server while the result set is being populated during a query. Prefetching row data into the client reduces the number of round trips to the server. A typical value for this property is 10.
defaultBatchValue: Oracle JDBC drivers allow you to accumulate inserts and updates of prepared statements and send them to the server in batches once it reaches a specified batch value. This feature reduces round trips to the server. Use the value 1 if you don’t want to use this feature.
processEscapes: “false” to disable escape processing for statements (Statement or PreparedStatement) created from this connection. Set this to “false” if you want to avoid many calls to Statement.setEscapeProcessing(false);. This is espcially usefull for PreparedStatement where a call to setEscapeProcessing(false) would have no effect. The default is “true”.