HPlogo HP Driver for JDBC User's Manual: HP 3000 MPE/iX Computer Systems > Chapter 4 Using the HP Driver for JDBC

Connection Parameters

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The following information is required for all HP JDBC connections to an ALLBASE/SQL or IMAGE/SQL database:

Host name — The name of the server host on which the ALLBASE/SQL or IMAGE/SQL database and JDBC Monitor is running. This can either be the name of the server host, or the IP address. For example, 'myserv.mycomp.com' or '20.45.12.122'.

Port number — The port number on which the JDBC Monitor is listening. This is specified when the monitor is started on the server host in the startup command or script. The default port number for use by the JDBC Monitor is 31700. If a port number is not specified, this default value is used.

User Name — A valid user name for the server host. The JDBC Monitor performs user validation on the server host for all client connections. For the HP-UX server platform, the user name is the same as the HP-UX user id. For the MPE/iX server platform, the user name can be composed of a user, group, account, and session id. The user name is masked by the JDBC Driver before it is transferred over the network to prevent casual detection.

User Password — The password(s) that match the provided user name. For the HP-UX server platform this is the password for the provided HP-UX user id. For the MPE/iX platform, this is composed of the group and account passwords for the group and account provided as the user name. The user password is masked by the JDBC Driver before it is transferred over the network to prevent casual detection.

Database Name — This is the name of the ALLBASE/SQL or IMAGE/SQL database file on the server. On HP-UX, this is the fully qualified path and filename of the database file. On MPE/iX, this is either the fully qualified three-part filename of the database, or the database name if a user.account,group name was specified.

NOTE: Database name for MPE/iX usually includes the location of the DBE. If the username does not include the same logon group, the full location must be provided.

These values must be validated before a connection is made to the JDBC Server. The sample client provided with the HP Driver for JDBC can be used to test the correctness of these values.

Once these values have been determined, the JDBC Driver connection URL can be synthesized. There are two primary JDBC Driver class methods that can be used to connect to the database. The first one requires that all connection parameters be provided in a Java String URL, including the user name and password. However, this information can be logged on the client, thus recording the user name and password. Remember that the user name and passwords can be used to log on to the server host.

The second connection method also takes a Java String URL, but allows for the user name and password to be specified as separate arguments, which are not logged. This would be the more secure method of connecting to the database.

The choice of method is entirely up to the application developer. The HP Driver for JDBC supports both methods.

Feedback to webmaster