JDBC Server Programmer's Reference
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.
command
is one of the following commands. Each user_ID and password in these commands must consist of 1 to 32 printable
characters and cannot contain spaces or tabs.
adduser user_ID password
Adds a new user to the Security File. If user_ID is already in the Security File, an error occurs. The specified
password is encoded using a secure one-way hash function.
deleteuser user_ID
deletes a user from the Security File. If user_ID is not in the Security File, a warning is issued.
changeuser user_ID password
changes the password associated with a user ID. If user_ID is not in the Security File, a warning is issued.
infouser user_ID password
indicates whether the user ID and password exist. If user_ID is not in the Security File, a warning is issued.
infousers
Displays the user ID for all users in the Security File. If the Security File is empty, a warning is issued.
Sample Application
The following client application, TestClient, uses the Type 3 JDBC driver to access a NonStop SQL/MP database.
TestClient prints the contents of the database table specified on the command line.
// This program is free software; you can redistribute it and/or modify it.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// merchantability or fitness for a particular purpose.
import java.sql.*;
import java.rmi.*;
import java.net.InetAddress;
import com.tandem.jdbc.t3client.*;
// This is an example of a client using the Type 3 JDBC Client Driver to access
// a NonStop SQLMP database. This program prints the contents of a NonStop
// SQLMP database table which the program accepts as an argument.