Oracle® JDBC for Rdb User Guide June 2008 Release 7.2.5.3 Oracle JDBC for Rdb User Guide, Release 7.2.5.3 Copyright © 2005, 2008 Oracle Corporation
Management of the Oracle JDBC for Rdb servers may be carried out using the Oracle JDBC for Rdb controller or by using the Oracle SQL/Services manag
The PORT_ID is also used to determine the configuration file to use on server startup. This file can be a CFG or an XML-formatted configuration file
7.1.2.4 Determining Server Type During the startup of the server associated with the Oracle SQL/Services JDBC dispatcher, the type of the server t
$ DEFINE/SYSTEM RDB$JDBC_SQSTYPE_1888 MP $ MCR SQLSRV_MANAGE71 SQLSRV> CONNECT SERVER; SQLSRV> CREATE DISPATCHER JDBC_DISP NETWORK_PORT TCPIP P
For example: SQS_MALIBU_SQLSRV_DIS06010.LOG This log can be useful in determining why a dispatcher did not start up properly. For example if ap
SYS$MANAGER:SQLSRV_JDBC_SERVER_STARTUP<version>.COM to start the server associated with a JDBC dispatcher. As multiple versions of SQL/Se
7.3 Using Pool Servers Each JDBC dispatcher defined is related only to a single server. Use a pool server if you require more than one server to b
name="SQSrjs1" type="RdbThinSrv" url="//localhost:1891/"
The Oracle SQL/Services JDBC dispatcher SQS_ONSTARTUP command procedure is used during the startup of the associated pool server. Those servers that
Chapter 8 Other Features 8.1 Anonymous Usernames By default, the thin driver disallows blank usernames to be passed to it during database conne
The first pass at privilege checking occurs at an object identifier level, asking if this entity has the right to do this action to this object. If
Chapter 2 Oracle JDBC for Rdb There are two types of Oracle JDBC for Rdb drivers: Oracle JDBC for Rdb native driver Oracle JDBC for Rdb th
When you use a Multi-process server a separate executor process is used to carry out the database operations. This executor process inherits the priv
When persona is used both the multi-process server and the pool server will need to have read/execute/write access to the RDB$JDBC_COM directory and
behalf of the client. Please see the Oracle Rdb documentation for information on the default transaction mechanism provided by SQL. 8.5 Executor
On some systems where the workload is heavy and particularly on single-cpu systems it is possible that after the sub-process is created the main proc
"jdbc:rdbNative:my_db_dir:pers@ignoreStatementCancel=true", user, pass); 8.8 Inactivity timeouts The amount of time either a client c
Connection conn = DriverManager.getConnection( "jdbc:rdbthin://bravo:1701/my_db_dir:[email protected]=3600000",user, pass); When s
When server is terminated by this timeout the following message will be logged in the server log: Server terminated due to inactivity 2006-02-08 12
The standard thin server is a multi-threaded server that allows concurrent access to Oracle Rdb by many client processes. Within a single OpenVMS pro
1. A connection lockwait value as specified explicitly on the connection string will take precedence over the server lockwait value but only for th
Results in a lockwait of 10. See your Oracle Rdb Documentation for more information on the use of the RDM$BIND_LOCK_TIMEOUT_INTERVAL logical nam
Table 2-1 RdbNative Format Elements Element Description <database_specification> Is the full file specification of the Rdb database that you
The following two special server names may be used, DEFAULT and DEFAULTSSL, within the XML-formatted configuration file. The server characteristics
and the following command line statement: $ java -jar rdbthinsrv.jar -cfg MY_CFG.XML -name "myServer" A thin server with the name my
8.14 On Start Commands There are two startup command attributes that may be specified in the XML-formatted configuration file server section:
srv.onStartCmd="@rdb$jdbc_com:our_setup.com" /> Care should be taken when providing commands for the server process to execute us
8.14.2 srv.onExecStartCmd This option specifies a DCL command to be executed prior to the invocation of an executor by a multi-process server. It
To ensure better security of these passwords, the server configuration file may contain the server control password in an obfuscated form. Example
Obfuscated passwords are only valid when used in conjunction with a server definition in a configuration file or as a server start up command line co
If the server restrictAccess property is false or not specified or if no allowDatabase subsection is specified for the server then no database restr
Example <server name="srv2restrict" type="RdbThinSrv" url="//localhost:1701/" restrictAcce
In this example, an obfuscated password is used which matches the plain text password "jdbc_user" To connect to a database using this
The thin driver allows a direct connection to any Oracle Rdb database via an Oracle JDBC for Rdb server using TCP/IP on Java sockets. Note: When the
rdb$jdbc_home:rdbjdbc_startsrv.com and the executor startup command procedure: rdb$jdbc_home:rdbjdbc_startexec.com Caution: Do not use the SET
srv.startup=rdb$jdbc_home:rdbjdbc_startsrv.com You can choose to change this default command procedure to customize for your system settings, or yo
Caution: Do not use the SET VERIFY command within these command procedures. As the method Runtime.exec() may be used by the servers to create process
OpenVMS FailSAFE IP may be using in conjunction with Oracle JDBC for Rdb thin driver and servers. During failover, FailSAFE IP will redirect the e
Format SET TRACELEVEL <trace_level> Sets the trace level, see Trace for more information. SET SQLCACHE <sqlcache_size> Sets the SQL
Example • • Set the sqlcache property of the Properties passed to the DriverManager.getConnection method: Properties info = new Properties(); in
8.23 Trace Trace provides tracing of method calls and other debug information within the Oracle JDBC for Rdb drivers and servers. See Trace Values
See Connection Options for more details. 8.23.1.2 Tracelevel Switch Using the tracelevel switch when starting a server can enable tracing: Ex
Example $java -jar rdb$jdbc_home:rdbthincontrol.jar rdbthincontrol> connect //localhost:1701/ jones mypassword rdbthincontrol> set traceleve
8.24 File and Directory access Requirements • RDB$JDBC_HOME • RDB$JDBC_COM • RDB$JDBC_LOGS There are certain file and directory access re
Connection conn = DriverManager.getConnection( "jdbc:rdbThin://bravo:1701/my_db_dir:personnel",user, pass); Note: Th
If persona is used with servers then you must ensure that the persona has the appropriate access rights as described above. Contents 140
Chapter 9 9.1 The maximum size of a blob segment supported by Oracle Rdb today is 65535. The Oracle JDBC for Rdb drivers will correctly handle segme
byte[] bytes = bl.getBytes(1,9999); String st1 = new String(bytes); System.out.println("resume : " + st1 ); 9.2 ResultSet.getBytes()
Chapter 10 10.1 Disallowed Dynamic SQL Statements 10.2 1. 2. 3. 4. 5. 6. 7. Run your applications • Other Information Because JDBC has
correctly specified thus details of the appropriate command procedures will be provided below. -RDMS-F-ROOTMAJVER, database format 71.0 is
Both Rdb and JAVA provide mechanisms by which you can set up your environment for a specific version or variant. The Rdb version set up and the JAVA
The steps that follow assume that the appropriate logical names have been set up and are available for use by you and Oracle JDBC for Rdb. If
specification be available to that process. The easiest way to ensure this is to have system wide logical names. In addition a control password, My
anonymous = "false" bypass = "false" tracelocal = "false" relay = &
Example my_setup.com $@SYS$LIBRARY:RDB$SETVER 72 $@sys$common:[java$142.com]JAVA$142_SETUP.COM FAST $define/job MY_DB_DIR sys$common:[DBS]
<option_name> <value> Default Description The value 0 means unlimited idle time allowed.See Client connection timeout for more details
Once the Oracle JDBC for Rdb kit is installed on you OpenVMS server machine you must copy the thin driver component to the machine on which you will
// You need to import the java.sql package to use JDBC import java.sql.*; // We import java.io to be able to read from the command line import java
// Utility function to read a line from standard input static String readEntry(String prompt) { try { StringBuffer buffer = n
3. 4. 5. Create a JDBC dispatcher in SQL/Services Associate configuration and setup files Start the JDBC dispatcherSee Chapter 7 Oracle SQL/Servic
about the various servers you may be running. In addition it provides session information for users of the controller. For this walkthrough
<session name="DEFAULT" tracelevel="0" srv.mcBasePort="5517" srv.mcGroupIP="239.192.1.
default, this file will be used by the dispatcher whenever a server has to be started. JDBC Dispatcher Setup Procedure describes the use of a setup
Given the PORT_ID of 1888: • • • server name = SQS1888 configuration file = RDB$JDBC_COM:SQS1888_CFG.XML setup file = RDB$JDBC_COM:RDBJDBC_SQS_
TCP/IP port 1888 Inactive JDBC clients Log path: SYS$MANAGER: Dump path: SYS$MANAGER: Log File: SYS$SYSROOT:[SYSMGR]SQS_DECRDB_JDBC_DISP08O91.LOG; Du
tracelevel = "0" autostart = "false" autorestart = "false" restrictAccess = "false"
<option_name> <value> Default Description hex integer client connection will wait on the completion of a read or write on the network.
name="srvMPforRdb" type="RdbThinSrvMP" url="//localhost:1705/" autoStart="true"
VARCHAR(n) VARCHAR NCHAR VARYING VARCHAR FLOAT[(n)] If n > 24 then DOUBLE else FLOAT REAL FLOAT DOUBLE PRECISION DOUBLE DECIMAL[(n[,n])] DECI
TIME TIME BIGINT INTERVAL VARBINARY BYTE VARYING BLOB LIST OF BYTE VARYING CLOB LIST OF BYTE VARYING 10.7 JDBC Specification SQL to Java Datat
16310.8 JDBC Specification Java to SQL Datatype Mappings Java Type SQL Type (from java.sql.Types) boolean BIT byte TINYINT short SMALLINT int
Example To connect using the thin driver via an Oracle JDBC for Rdb server to MY_DB_DIR:PERS on node BRAVO using port 1755 and enabling full trace lo
Example To set trace level to trace everything for your application that utilizes either the Rdb native or Rdb thin driver: $java –Doracle.rdb.jd
Chapter 3 Oracle JDBC for Rdb Servers Oracle JDBC for Rdb servers are the server-side components that services JDBC requests issued by applicatio
applications if the Programs are used for such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the Program
3.1.1 Starting a Thin Server A thin server may be started by using the appropriate start statement within the controller, as an Oracle SQL/Service
SQLSRV> 3.1.1.3 Starting a Thin Server from the Command Line You may invoke a thin server from the OpenVMS command line. Instead of placin
A multi-process server is multi-threaded and may handle multiple concurrent clients allocating each client its own subprocess for database access, th
Alternatively the controller may be used in command mode to start a server $ java –jar rdbthincontrol.jar –cfg mycfg.xml – –name Mpserv1 –starts
Alternatively, you may wish to create a server definition within an XML-formatted configuration file and then start the server using its server nam
3.2.4 Executor Naming Each executor started up on a single system requires a unique process name on that system. By default a name will be created f
3.2.5 Executor Process Startup The multi-process server will create a subprocess for each executor it allocates and starts. OpenVMS command proced
1. An executor name based on the server name is generated for the new process, see Executor Naming for more details. 2. Process quotas are determi
Subcode Description 30 disk or directory is write protected , check the disk/directory pointed to by rdb$jdbc_com 65530 process terminated prematurel
3.3.1 Starting a Pool Server A pool server must be invoked on each node on which you wish to provide server redirection. The pool server does no
Contents Preface ...
See Oracle SQL/Services and Oracle JDBC for Rdb Servers for more details. Example $run sys$system:SQLSRV_MANAGE71 SQLSRV> connect server ; Conne
You can use the srv.keepAliveTimer option on pool server start-up to specify the time between checks for non-running autoRestart servers. See Pool Se
Chapter 4 Server Configuration There are a number of configuration options that apply to Oracle JDBC for Rdb servers that may be used as comman
Option Default Description By default, anonymous connections are disabled and the client must specify a valid username and password combination to ac
Option Default Description autostart false If specified, indicates to any pool server that may include this server in its pool of servers to automa
Option Default Description If the file extension is XML the configuration parameters are held in a XML format. See Configuration Files for more detai
Option Default Description Exception. A value of minus one (-1) means wait indefinitely. log or logfile <file_specification> console Speci
Option Default Description pw or password <default_user_password> none Used in conjunction with the user and anonymous switches provides the
Option Default Description srv.execPrefix <prefix> see description Only valid for multi-process servers. Specifies the prefix to use for exe
Option Default Description Specifies the time in milliseconds to wait between server/executor handshake synchronization tries. srv.onExecStartCmd &l
5.2 SSL and the Controller... 59 5.3 SSL Conf
Option Default Description Valid values are: • RdbThinSrv standard thin server • RdbThinSrvSSL thin server using SSL for communication • RdbThinSrvM
Option Default Description controlpass <control_password> none Specifies the password that control users must use to be able to issue cont
Option Default Description srv.keepAliveTimer <seconds> 60 Sets the time (in seconds) of the duration between pool server checks for non-ru
See Configuration Files for examples of configuring a pool server. Contents 4.3 Configuration Files Instead of setting the switches on the comm
anonymous=true // enable password display showpass=true // limit the number of clients maxclients=10 // set the locking keywords lo
The XML-formatted configuration file differs from the standard CFG file in that it may contain information about multiple servers in the same confi
restrictAccess = "false" anonymous = "false" bypass = "false" tracelocal = "false"
<server name="rdbpool" type="RdbThinSrvPool" url="//localhost:1702/" > <pooledServ
This section describes session characteristics for an interactive session. Information within the session section is currently only used by the Oracl
Option Default Description ssl.* none Specifies SSL configuration information for the session that may be used to connect to SSL-enabled thin se
8.7 Ignoring Statement.cancel() Method Calls... 113 8.8 Inactivity timeouts...
Format <database> [ database property ] /> Options Valid properties for the database section can be seen in Table 4–4 Database Sectio
4.3.2.5 Servers Section This section specifies one or more server property sections. Format <servers> [ server section ] </servers&
name="DEFAULT" type="RdbThinSrv" url="//localhost:1701/" maxClients="-1" srv.bi
The set of pooledServers provided will make up the pool of servers that the parent pool server may try to access. Format <pooledServer name=&q
This subsection specifies the usernames the server will allow access to. The declared username must be a valid username recognized by Rdb. The match
Because the LOGINOUT.EXE program is run, any file specification using relative file paths must be relative to the login directory of the invoker, oth
Chapter 5 Using SSL Secure Sockets Layer (SSL) was developed to provide security for Web traffic. Including confidentiality, message integrity,
Example Properties info = new Properties(); info.put("user", user); info.put("password", password); info.put("tracelevel&qu
5.1.2 Server SSL Configuration An SSL-enabled server must also be provided with SSL configuration information. This is usually provided within the
<server name="SSLsrv1" type="RdbThinSrvSSL" url="//localhost:1707/" /> <server name=&q
10.3 Sample Setup, Starting an Oracle JDBC for Rdb thin server from Oracle SQL/Services.152 10.4 Sample configuration file MY_SERVERS.XML ...
ssl.context="TLS" ssl.keyManagerFactory="SunX509" ssl.keyStoreType="jks" ssl.keyStore="rdb
Option Default Description "jks". ssl.keyStore <store filename> none Indicates the filename of the keystore. ssl.keyStorePassword
-file client.cer –keystore rdbjdbccli.kst $! $!---------------------------------------------------------------------- $! $! Exchange the certificates
Chapter 6 Oracle JDBC for Rdb Controller The Oracle JDBC for Rdb controller (here-on referred to as the controller) allows basic management of Or
RDB$ALLOWS_ANON : false RDB$ALLOWS_BYPASS : false RDB$NUMBER_OF_CLIENTS : 0 RDB$MAX_CLIENTS : -1 RDB$NODE : local
RDB$NODE : 138.1.14.91 RDB$PORT : 1702 RDB$STATUS : Idle RDB$SERVER_NAME : srv2 RDB$SERVER_TYPE
rdbthincontrol> poll Polling servers ... rdbthincontrol> exit 6.1 Running the Controller The controller allows basic management of Oracle
-controlpass <control password> none Specifies the control password to use when connecting to servers. This password takes precedence over an
session The value zero (0) means no tracing. -u or –user <user_name> .none Specifies the username to use for connection to the server -url &
given on the command line See Stopping Servers for more information -stopclient <client_id> Issues the Stop Client command which requests t
Preface Purpose of This Manual The Oracle JDBC for Rdb 7.2.5.3 User Guide describes concepts, features and usage of the Oracle JDBC for Rdb drivers
The commands that may be issued once a connection has been established to a server are discussed in Commands requiring server connection. The comman
stop client <client_id> Stops the client matching the specified <client_id> on the currently connected server. See Stopping Clients for
Servers for more details. set session controlpass <pwd> Sets the sessions control password. See Control Password for more information. s
stop active servers stop all servers stop server <server_ident> Stops active servers. See Stopping Servers for more details. open active se
If a server does not recognize the provided control password, it will respond with a failure message: rdbthincontrol> show active servers Failed t
<server_ident> [<server_uid>] The <server_ident> string can be one of the following: • Port ID - this is the same as issuing
This command connects to the server specified by the <server_connection> information. Example The following examples use the Connect command:
Example rdbthincontrol> stop server myMPServer Failed to connect <CONTROL> No Rdb Thin Server connection has been established Unable to co
The configuration file contents used for these examples may be seen in Sample configuration file MY_SERVERS.XML 6.4.1 Closing Servers Active serv
6.4.1.2 Command mode The command mode commands available to close servers can be seen in Table 6–6 Command Mode Close Server. Table 6-6 Command Mo
Hewlett-Packard Company is often referred to as HP. The following conventions are used in this document: word A lowercase word in a format example in
The control commands available to open servers can be seen in Table 6–7 Interactive Open Server. Table 6-7 Interactive Open Server Command Descri
Command Description -openServer Opens the server as specified by other command line options Example $ thincontrol –openServer –url //prod_no
Command Description by the server connection information. See Connecting to servers for more information Example rdbthincontrol> show s
Note: If multiple conflicting keywords are found on the one command line only one action will be taken and the following precedence is used • -all •
Only those servers that have the autostart attribute and are for the local host will be started. start server Starts a server of type RdbThinSrv
-startServer Starts the server as specified by other command line options Example $ thincontrol –startServer –port 1701 –node localhost $ t
Example rdbthincontrol> stop server rdbthincontrol> stop server myserv rdbthincontrol> stop server //prod_node:1766/ rdbthincont
6.4.6 Watching Servers The trace output for an active server may be displayed on the controller console. You must provide a valid control password
6.4.7 Polling Servers The poll command uses the multicast information to poll responding Oracle JDBC for Rdb servers: Each available server will r
Example $ thincontrol –poll 6.4.7.3 Multicast Polling The controller uses multicast polling to discover Oracle JDBC for Rdb servers that may be
Chapter 1 Introduction Oracle provides the following Oracle JDBC for Rdb drivers: Oracle JDBC for Rdb native driver for client-side use with
Please consult your network manager to ensure that multicast polling is allowed on your system. Your network manager may also allocate a specific IP
Example rdbthincontrol> show active clients rdbthincontrol> show all clients fred rdbthincontrol> show clients rdbthincontrol> sh
If a database file specification is used, then only those clients current connected to that database will be stopped. The database file specification
rdbthincontrol> stop client 0000000A rdbthincontrol> stop all clients in disk1:[dbs]pers 6.5.2.2 Command mode The command mode commands
-in <database_spec> The following Command line options, if present will be ignored: • -name • -node • -port • -URL -stopClients –in &l
Chapter 7 Oracle SQL/Services and Oracle JDBC for Rdb Servers The Oracle SQL/Services management command line may be used to start and stop ser
To be able to start and stop Oracle JDBC for Rdb servers using Oracle SQL/Services, a dispatcher with protocol JDBC must be defined using the Oracle
Each Oracle SQL/Services JDBC dispatcher must be associated with an Oracle JDBC for Rdb server. The PORT_ID specified in the dispatcher creation is t
A server name is required as it may be used by the server start up procedure to locate properties from its configuration file. The name used will det
This command procedure will setup some environmental elements and then execute a JAVA command to start the server. A discrete dispatcher process wi
Komentarze do niniejszej Instrukcji