JDBC Type 4 Driver Programmer's Reference

Security
Clients connect to the MXCS server with a valid Guardian user name and ID, using standard JDBC 3.0 APIs. An application can make
multiple connections to MXCS using different user IDs, and creating different connection objects.
The Type 4 driver provides for user name and password authentication before connecting to MXCS. The password is encrypted with a
proprietary algorithm provided by the MXCS product.
Note: There is no secure wire communication such as SSL provided for the communication between Type 4 driver and the MXCS
server.
Connection to SQL/MX
A Java application can obtain a JDBC connection to NonStop SQL/MX 2.0 in two ways:
Using the DriverManager class
Using the DataSource interface
Connection Using the DriverManager Class
This is the traditional way to establish a connection to the database. The DriverManager class works with the Driver interface to
manage the set of drivers loaded. When an application issues a request for a connection using the
DriverManager.getConnection method and provides a URL, the DriverManager is responsible for finding a suitable driver
that recognizes this URL and obtains a database connection using that driver.
com.tandem.t4jdbc.SQLMXDriver is the Type 4 driver class that implements the Driver interface. The application can load
the Type 4 driver in one of the following ways:
Specifying the Type 4 driver class in the -Djdbc.drivers option in the command line
Using the Class.ForName method within the application
Adding the Type 4 driver class to the jdbc.drivers property within the application
The DriverManager.getConnection method accepts a string containing a Type 4 driver URL. The JDBC URL for the Type 4
driver is:
jdbc:t4sqlmx://ip_address|machine_name:port_number/:
ip_address:port_number specifies the location where the NonStop MXCS association server is running.
When connecting by using the DriverManager class, use the information in the following topics:
Type 4 Driver Properties Used with the DriverManager Class
Guidelines for Using Connections with the DriverManager Class
JDBC Type 4 Driver for NonStop SQL/MX Properties Used with the DriverManager Class
JDBC Type 4 driver for NonStop SQL/MX defines the following set of properties that you can use to configure the driver:
Property Name Type Value Description
url
String
See url.
If the url default is not specified
and
DriverManager.getConnection()
is called, the NonStop JDBC
Type 4 Driver throws an
SQLException.
user
String
See user.
The string user value on the
NonStop system, used for
MXCS connection.
password
String
See password.
The string password value on
the NonStop system, used for
MXCS connection.