Compaq NonStopTM JDBC Server Programmer's Reference Abstract This document describes the Compaq NonStopTM JDBC Server 1.0, update 1, a Type 3 JDBC driver that allows Java programmers to remotely (on a PC or UNIX machine) develop and debug applications that will be deployed on Compaq NonStopTM Himalaya servers to access Compaq NonStopTM SQL databases. Product Version NonStopTM JDBC Server 1.
These notices shall be marked on any reproduction of this data, in whole or in part. NOTICE: Notwithstanding any other lease or license that may pertain to, or accompany the delivery of, this computer software, the rights of the Government regarding its use, reproduction and disclosure are as set forth in Section 52.22719 of the FARS Computer Software--Restricted Rights clause.
MATERIAL PROVIDED HEREIN, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. OSF shall not be liable for errors contained herein or for incidental consequential damages in connection with the furnishing, performance, or use of this material. © 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
Compaq NonStop JDBC Server Programmer's Reference TM Is This Document for You? The NonStopTM JDBC Server Programmer's Reference is for Java programmers who want to do remote (PC or UNIX machine) development and debugging of applications that will be deployed on a Compaq NonStopTM Himalaya server to access Compaq NonStopTM SQL databases. This reference focuses on the NonStop JDBC Server 1.
Note: Some browsers require you to reduce the print size to be able to print all the text displayed on the screen. Related Reading The following documents provide information to supplement the descriptions in this reference. JDBC References JDBC is the JavaSoft standard for connecting Java programs to SQL databases. (JDBC is a product name, not an abbreviation. Nevertheless, JDBC is often thought of as standing for "Java Database Connectivity.
NonStop SQL/MP Reference Manual Describes the SQL language elements, expressions, functions, and statements (see this manual for the complete description and syntax of the report writer commands and the SELECT statement). NonStop SQL/MP Installation and Management Explains how to plan, install, create, and manage a NonStop SQL Guide database; describes the syntax of installation and management commands; and describes NonStop SQL catalogs and file structures.
Fax (408) 285-6230 Number of Pages (including this cover sheet): ______ Manual NonStopTM JDBC Programmer's Reference Part Number 422674-001 Comments We welcome your comments on the quality and usefulness of our software documentation and the User Documentation disk. Your comments will be forwarded to the appropriate person for review and action. If your answer to any of the following questions is "no," please supply detailed information.
Parentheses, commas, equal signs, and other symbols not previously described must be entered as shown. For example: -D propertyName=newValue Item Spacing Spaces shown between items are required unless one of the items is a punctuation symbol such as a parenthesis or comma. If there is no space between two items, spaces are not permitted. In the following example, spaces are not permitted before or after the period: subvolume-name.
In addition to the Type 3 driver and the JDBC Server, the NonStop JDBC Server includes jdbcSecurityMgr, a Java application that manages database access. For more information about jdbcSecurityMgr, see Controlling Database Access With jdbcSecurityMgr . Installing and Configuring the NonStop JDBC Server For instructions on installing the NonStop JDBC Server, and for information about hardware and software requirements, see the following files on the product CD: ● README.
Note: Previous versions of the jdbcServer.jar file must not appear in your CLASSPATH nor in /usr/tandem/java/jre/lib/ext. Any old versions of the jdbcServer.jar file residing in the ext directory must be moved to another directory. If you leave a previous version of this jar file in /usr/tandem/java/jre/lib/ext, the Java Virtual Machine will find the old jar file before it finds the new jar file in your CLASSPATH. If another version of the jdbcServer.
configuration file. The default policy configuration file shipped with NonStop Server for Java is not adequate for use with the JDBC server. You need to create an additional policy file to grant the necessary permissions. You can start the JDBC Server on the Compaq server with a java command of the form: java [system_properties]com.tandem.jdbc.server.
specifies the absolute name of the user-created policy file. Starting the JDBC Server Using System Properties The following example, which specifies System Properties, shows how to start the JDBC Server and register the NonStop SQL/MP driver: java -Djava.security.policy=/usr/mydir/policy -Dnoa=true \ > com.tandem.jdbc.server.jdbcServer -startRegistry com.tandem.sqlmp.SQLMPDriver Alternatively, you can declare the available drivers as a jdbc.drivers System Property.
allowing the distributed garbage collector to perform garbage collection on these objects. This method also aborts any transactions associated with the Connection that are still active. (As long as a transaction remains active, it maintains database locks, thus preventing other applications or clients from accessing the data). To assist in remote cleanup, you should explicitly drop any remote reference in the client program.
Controlling Database Access With jdbcSecurityMgr If you have chosen to request user authentication, Java programs that use the NonStop JDBC Server must supply a user ID and a password when they attempt to connect to a NonStop SQL database. The NonStop JDBC Server checks this user ID and password against its JDBC Security File, which you can view and change using the Java application jdbcSecurityMgr.
Note: To avoid performance degradation, do not use jdbcSecurityMgr to update the Security File while JDBC requests are active. To use jdbcSecurityMgr, enter: java [policy_prop] com.tandem.jdbc.server.jdbcSecurityMgr [-port port_number] command port_number is the number of either the port on which the JDBC server is running (if you chose to have the JDBC server create an rmiregistry) or the port on which the rmiregistry is running. If you omit port_number, the default port number, 1099, is used.
// // Usage: // // java TestClient -table SQLTable [-port PortNumber] [-server ServerHost] // // SQLTable is the name of an existing NonStop SQLMP database table. // // PortNumber is the port number of the RMI Registry. The default, if not // supplied, is 1099. // // ServerHost is the name of the server where the NonStop SQLMP database // resides. If not supplied, it defaults to the local system.
argOK = true; } // -table // -port > if(arg.equals("-port")) { if(args.length <= i) { System.out.println("Usage: -table SQLTable [-port PortNumber] \ [-server ServerHost]"); System.exit(1); } try { Integer.parseInt(args[i]); } catch(java.lang.NumberFormatException nfe) { System.out.println("Error: Invalid port number specified"); System.exit(1); } port = new String(":" + args[i]); i++; argOK = true; } // -port > > > > // -server if(arg.equals("-server")) { if(args.length <= i) { System.out.
} // Test with NonStop SQLMP database. databaseUrl = new String("/jdbc:sqlmp:"); rmiJdbcUrl = new String("t3jdbc:sqlrmi:"); if(port == null) { port = new String(""); } // Set up the server host string. if(server != null) { serverHost = new String(server + port); } else { serverHost = new String("//" + InetAddress.getLocalHost().getHostName() + port); } // Connect to the NonStop SQLMP database.
Compaq NonStopTM JDBC Server Programmer's Reference (422674-001) Copyright © 2001, Compaq Computer Corporation. All rights reserved.