Login Register Actian.com  

Actian Community Wiki

Navigation
Learn About
Developing With
Ingres Talk
Information
Toolbox

Ingres JDBC Config Utility Documentation

From Ingres Community Wiki

Jump to: navigation, search
Image:ProjectBarDocumentation.png

                                                                                                                                                                                                     

                                                                                                                                                                                                     

                                                                                                                                                                                                     

                                                                                                                                                                                                     

Ingres JDBC Config Utility Documentation
Documentation

Contents

Proposed Documentation for "iijdbcprop" Command - Ingres JDBC Driver Properties Generator Utility

This command generates a sample Ingres JDBC driver properties file for use with the JDBC driver (iijdbc.jar) – see Ingres Connectivity Guide in the JDBC chapter for details on the properties. The benefits of using this command are:

1. Automatically generate all JDBC properties that match related Ingres environment variables, such as II_TIMEZONE_NAME, II_DECIMAL, II_DATE_FORMAT, II_MONEY_FORMAT and II_MONEY_PREC. This can be useful to keep the JDBC driver behavior in sync with an Ingres installation, since the JDBC driver does not have access to the Ingres environment variables and is often deployed on a machine totally separate from Ingres.

2. Reduce typo and misspelling errors trying to enter JDBC properties by hand. All of the available JDBC properties are generated into the file and, though most are commented out, they can easily be uncommented by removing the leading # sign and appropriate values set.

This command is invoked by the DAS configuration utility (during installation for instance) to create an iijdbc.properties file under $II_SYSTEM/ingres/files directory. This command may also be invoked standalone at any time.

The iijdbcprop command has the following format:

iijdbcprop -a | -t | -c | -f <fname> | -h |

-a Lists all supported driver properties including tracing properties to STDOUT, with all commented out that are not in the Ingres config files.

-t Lists all trace properties only (commented out) to STDOUT.

-c Same as flag 'a' but writes to a file named "iijdbc.properties".

-f <fname> Same as flag 'c' but writes to a disk file provided by the user.

-h Help information (this display).


Examples

List only the trace properties in STDOUT

This command only lists the JDBC driver trace properties in the STDOUT.

iijdbcprop -t

Create a properties file containing all supported properties

This command creates an iijdbc.properties” file in the $II_SYSTEM/ingres/files directory containing all supported JDBC driver properties, most of which are commented out using '#' operator.

iijdbcprop -c

Sample iijdbc.properties file

ingres.jdbc.property.user=<User ID on the target DBMS>
ingres.jdbc.property.password=<User's OS password>
ingres.jdbc.property.group=<User's group ID>
ingres.jdbc.property.role=<Role ID | Role ID/password>
ingres.jdbc.property.dbms_user=<User ID of DBMS session>
ingres.jdbc.property.dbms_password=<User's DBMS password>
ingres.jdbc.property.connect_pool=<on/off>
ingres.jdbc.property.autocommit_mode=<dbms/single/multi>
ingres.jdbc.property.vnode_usage=<connect/login>
ingres.jdbc.property.select_loop=<on/off>
ingres.jdbc.property.cursor_mode=<dbms/update/readonly>
ingres.jdbc.property.char_encode=<Java Character Encoding>
ingres.jdbc.property.timezone=NA-PACIFIC
ingres.jdbc.property.decimal_char=<II_DECIMAL equivalent>
ingres.jdbc.property.date_format=<II_DATE_FORMAT equivalent>
ingres.jdbc.property.money_format=<II_MONEY_FORMAT equivalent>
ingres.jdbc.property.money_precision=<II_MONEY_PREC equivalent>
ingres.jdbc.property.date_alias=<ingresdate/ansidate>
ingres.jdbc.trace.log=<Path and file name for driver trace>
ingres.jdbc.trace.drv=<Driver tracing level (0-5)>
ingres.jdbc.trace.ds=<Datasource tracing level (0-5)>
ingres.jdbc.trace.msg=<Messaging I/O tracing level (0-5)>
ingres.jdbc.trace.msg.tl=<Transport I/O tracing level (0-5)>
ingres.jdbc.trace.msg.nl=<Network I/O tracing level (0-5)>
ingres.jdbc.trace.timestamp=<Include Timstamp in tracing (true)>
ingres.jdbc.dbms.trace.log=<Path and file name for DBMS trace>
ingres.jdbc.property_file=<Path and filename>
ingres.jdbc.lob.cache.enabled=<true/false (default:false)>
ingres.jdbc.lob.cache.segment_size=<# of bytes/chars per segment in LOB cache (default:8192)>
ingres.jdbc.lob.locators.enabled=<true/false (default:true)>
ingres.jdbc.lob.locators.autocommit.enabled=<true/false (default:false)>
ingres.jdbc.lob.locators.select_loop.enabled=<true/false (default:false)>
ingres.jdbc.date.empty=<default/null/empty>

As an example of turning on tracing in the driver, the user can uncomment the desired trace entries in the iijdbc.properties file and provide appropriate values for them as shown below. On Unix platforms, the following entries in iijdbc.properties file will produce a JDBC driver trace file under the /tmp directory called jdbc_driver.log, provided the $II_SYSTEM/ingres/files directory is in the CLASSPATH.

ingres.jdbc.trace.log=/tmp/jdbc_driver.log
ingres.jdbc.trace.drv=5
ingres.jdbc.trace.msg=3


In the case of running Ingres JDBC applications connecting to DAS server remotely, i.e no Ingres exists on the machine running iijdbc.jar, the iijdbc.properties file from remote Ingres installation can be copied over to the machine running iijdbc.jar and it is required to include the directory of this iijdbc.properties file in the CLASSPATH.

Properties are searched in the following order: URL attributes, getConnection() property set, system properties, alternate properties file, and default properties file.

Personal tools
© 2011 Actian Corporation. All Rights Reserved