Version and Copyright Information Document Title HP NonStop JDBC Type 4 Driver 2.0 Programmer's Reference Abstract This document describes how to use the HP NonStop™ JDBC Type 4 Driver. This driver provides Java applications running on a foreign platform with JDBC access to an HP NonStop SQL/MX database running on the HP NonStop platform. Where applicable, the Type 4 driver conforms to the standard JDBC 3.0 API from Sun Microsystems, Inc. Product Version HP NonStop JDBC Type 4 Driver 2.
Legal Notices © Copyright 2009 Hewlett-Packard Development Company L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice.
1991 Siemens Nixdorf Informationssysteme AG. © 1986, 1989, 1996, 1997 Sun Microsystems, Inc. © 1989, 1990, 1991 Transarc Corporation. This software and documentation are based in part on the Fourth Berkeley Software Distribution under license from The Regents of the University of California. OSF acknowledges the following individuals and institutions for their role in its development: Kenneth C.R.C. Arnold, Gregory S. Couch, Conrad C. Huang, Ed James, Symmetric Computer Systems, Robert Elz.
HP NonStop JDBC Type 4 Driver 2.0 Programmer's Reference Next Version and Copyright Information Published May 2009 Table of Contents What's New in This Guide About This Guide Is This Document for You? Document Structure Printing This Document Related Reading Type 4 Driver APIs NonStop System Computing Documents Notation Conventions Abbreviations 1.
MXCS Data Source (server-side) Configuring MXCS XA Data Source Security How to Make a Connection to SQL/MX Connection by Using the DataSource Interface Overview of Tasks to Deploy DataSource Objects DataSource Object Properties Programmatically Creating an Instance of the DataSource Class Programmatically Registering the DataSource Object Retrieving a DataSource Instance by using JNDI and to the Data Source Specifying the Properties File that Configures the Data Source Connection by Using the DriverManager
Creating and Using a Properties File Setting Properties in the Command Line Precedence of Property Specifications Type 4 Driver Property Descriptions blobTableName Property catalog Property clobTableName Property closeConnectionUponQueryTimeout connectionTimeout Property dataSourceName Property description Property initialPoolSize Property ISO88591 Property KANJI Property KSC5601 Property language Property LOB Table Name Properties loginTimeout Property maxIdleTime Property maxPoolSize Property maxStatement
useArrayBinding Property user Property 5.
Access Considerations for Clob and Blob Objects 6.
Unsupported SQL/MX Features Unsupported SQL/MP Features Other Unsupported Features Restrictions 9. Tracing and Logging Facilities Standard JDBC Tracing and Logging Facility The Type 4 Driver Logging Facility Accessing the Type 4 Driver Logging Facility Controlling Type 4 Driver Logging Output Message Format Examples of Logging Output 10. Migration and Compatibility JDBC Drivers Third-Party Databases Operating Systems Compatibility 11. Messages About the Message Format Type 4 Driver Error Messages 12.
3.1. Corresponding SQL/MX Character Sets and Java Encoding Sets 4.1. Connection Control Properties 4.2. Pooling Management Properties 4.3. Operations on CLOB and BLOB Data 4.4. Internationalization Properties 4.5. Logging and Tracing Properties 4.6. Miscellaneous Client-Side Properties 4.7. Type 4 Driver Server-Side Properties List of Examples 6.1.
What's New in This Guide Prev Next What's New in This Guide The updates in this edition (529651-006) are: ● Added the following terms in Abbreviations: ❍ DSC ❍ MFC ● Updated maxStatements Property. ● Updated loginTimeout Property ● Added a new chapter, Module File Caching. ● Updated Sample Program Accessing BLOB Data. ● Added error message 29197. ● Added Appendix B. Scalar Functions.
● Added CallableStatement.getBlob to Unsupported Features. ● Added new error messages 29191 through 29196 for setQueryTimeoutErrorMessages. ● Added useArrayBinding server-side property. ● Added the new terms closeConnectionUponQueryTimeout and useArrayBinding to index. ● Modified the version procedure information under Verifying the Type 4 Driver. ● Removed index terms referring to deleted sections. ● Removed the following sections: ❍ Creating and executing SPJ with BLOB parameters.
● Updated the Note as the BLOB data types are supported with this release when using stored procedures in Java (SPJs). Added Types of LOB Table. ● Added instructions for: ● ● Creating and Executing SPJ with BLOB Parameters ● Retrieving BLOB Output Parameters Using CallableStatement.getBlob() ● Setting BLOB Input Parameters Using CallableStatement.setBlob() ● Added Using T4LobAdmin Utility for SPJ with BLOB parameters. ● Updated program_options and Example 6.
About This Guide Prev Next About This Guide Is This Document for You? Document Structure Printing This Document Related Reading Type 4 Driver APIs NonStop System Computing Documents Notation Conventions Abbreviations Is This Document for You? This HP NonStop JDBC Type 4 Driver 2.0 Programmer's Reference is for experienced Java programmers who want to access NonStop SQL/MX with the Type 4 driver. This document assumes you are already familiar with: ● J2EE or Java applications running on JDK 1.4.
Chapter 4, Type 4 Driver Properties Chapter 5, Working with BLOB and CLOB Data Chapter 6, Managing the SQL/MX Tables for BLOB and CLOB Data Chapter 7, Module File Caching (MFC) Chapter 8, Type 4 Driver Compliance Chapter 9, Tracing and Logging Facilities Chapter 10, Migration and Compatibility Chapter 11, Messages Describes how to set the properties that configure the driver and provides a detailed description of each property.
Type 4 Driver APIs Sun Microsystems Documents The following documents were available on Sun Microsystems Web sites when the HP NonStop JDBC Type 4 Driver was released. Note: Sun Microsystems Java 2 SDK, Standard Edition Documentation Version 1.4.1 is provided on the NonStop Server for Java 4 product distribution CD in an executable file for your convenience in case you cannot get Java documentation from the Sun Microsystems Web sites.
on NonStop servers to access NonStop SQL databases using SQL/MP or SQL/MX tables. ● JDBC Driver for SQL/MX Programmer's Reference—Describes how to use the JDBC Driver for SQL/MX (JDBC/MX), a type 2 driver that provides Java applications running on NonStop systems with access to NonStop SQL databases through the SQL/MX engine. ● SQL/MX documents ❍ SQL/MX Programming Manual for Java—Explains how to use embedded SQL in Java programs (SQLJ programs) to access NonStop SQL databases with SQL/MX tables.
A vertical line separates alternatives in a list that is enclosed in brackets or braces. For example: where [threadID|all] ... Ellipsis An ellipsis immediately following a pair of brackets or braces indicates that you can repeat the enclosed sequence of syntax items any number of times. For example: print {objectID|objectName} ... An ellipsis immediately following a single syntax item indicates that you can repeat that syntax item any number of times. For example: dump objectID ...
HTML. Hypertext Markup Language HTTP. Hypertext Transfer Protocol IEC. International Electrotechnical Committee I18N. Internationalization ISO. International Organization for Standardization JAR. Java Archive JCK. Java Conformance Kit JFC. Java Foundation Classes JDBC. Java Database Connectivity JDK. Java Development Kit JNDI. Java Naming and Directory Interface JNI. Java Native Interface JRE. Java Run-time Environment LAN. local area network MBCS. Multibyte-Character Set MFC.
What's New in This Guide Part Number 529651-006 Home Chapter 1.
Chapter 1. Introduction to HP NonStop JDBC Type 4 Driver Prev Next Chapter 1. Introduction to HP NonStop JDBC Type 4 Driver Type 4 Driver API Package Type 4 Driver Architecture Client Platforms Supported Accessing a Database with the Type 4 Driver Samples Type 4 Driver API Package The Type 4 driver package, com.tandem.t4jdbc, is shipped with the driver software. For class and method descriptions, see the HP NonStop JDBC Type 4 Driver API Reference manual in the NonStop Technical Library at docs.hp.com.
NonStop server. Client Platforms Supported Java enabled platforms that support JDK 1.4.1 or higher. For a detailed list, please refer to the softdoc file delivered with the product, either the product CD or on the website for Scout for NonStop Servers at HP NonStop eServices portal (https://onepoint.nonstop.compaq.com/). Registration is required at the website. Accessing a Database with the Type 4 Driver 1. A Java client application establishes a connection. 2.
Type 4 driver, through the MXCS Service, Accesses an SQL/MX Database Samples The following samples are provided with the Type 4 driver. Sample CallableStatementSample Description Demonstrates the invocation of a stored procedure in Java (SPJ).
Gets metadata from a table by using the Connection interface and ResultSetMetaData interface. The information retrieved includes DBMetaSample Type, (of what getTypeInfo()), catalogs, tables, procedures, columns, columns, column count on tables, and so forth.(1) Using the PreparedStatement interface, performs a select all and PreparedStatementSample parameterized select for data type of CHAR, INT, TIMESTAMP, DECIMAL, NUMERIC, and DATE.
About This Guide Part Number 529651-006 Home Chapter 2.
Chapter 2. Installing and Verifying the Type 4 Driver Prev Next Chapter 2. Installing and Verifying the Type 4 Driver Installation Requirements Product Files Setting CLASSPATH Verifying the Type 4 Driver Installation Requirements Hardware and software requirements for the Type 4 driver are described in the softdoc file delivered with the product, either on the product CD or on the website for Scout for NonStop Servers at HP NonStop eServices portal (https://onepoint.nonstop.compaq.com/).
● ❍ samples ● CallableStatementSample ● common ● DBMetaSample ● PreparedStatementSample ● README for samples ● ResultSetSample ● t4sqlmx.properties ● SQLMPSample ● WLS_MedRecSample ● WLS_TwoPhaseAndPoolingSample WLS_TwoPhaseSample ● ❍ docs ● ❍ white papers install ● ● t4sqlmx.jar product.contents (test input file for install, uninstall, and platform fixing) README.
T1249_V20(AAV)_31JAN08_HP_NONSTOP(TM)_JDBCT4_2008_01_23 To run the installation check program, use the command: java t4sqlmxSanityCheck Prev Chapter 1. Introduction to HP NonStop JDBC Type 4 Driver Part Number 529651-006 Up Home Next Chapter 3.
Chapter 3. Accessing SQL Databases with SQL/MX Prev Next Chapter 3.
Communication Overview The Type 4 driver is a three-layer program. Illustrates the three layers of the Type 4 driver—the API layer, IDL layer, and the Transport layer— to the MXCS association server Data Sources JDBC Data Source (client-side) MXCS Data Source (server-side) Configuring MXCS XA Data Source The term data source logically refers to a database or other data storage entity.
Configuring MXCS XA Data Source For XA transactions, do not use the default data source. A new data source, with the following configurations, must be created, and the JDBC serverDataSource property must be used to refer to this data source. 1. Use NSM/Web or MXCI to create a data source that has to participate in distributed (XA) transactions. Assuming that the data source created is XADS. 2. Logon to the NonStop server where the server side data source has to be configured, as super.super. 3. Start MXCI.
VARIABLE_SEQUENCE,VARIABLE_TYPE,VARIABLE_VALUE) values(3,0,7, '-XABRK XABR -DMBRK_TEST_XABR -PATH /G/system/ZXABRKR -CONN 100 -TRANS 10 -LVL 0'); 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 to MXCS.
1. Creating an instance of the DataSource class. 2. Setting the properties of the DataSource object. 3. Registering the DataSource object with a naming service that uses the Java Naming and Directory Interface (JNDI) API. An instance of the DataSource class and the DataSource object properties are usually set by an application developer or system administer using a GUI tool as part of the installation of the data source.
// enabled. ds.setMaxStatements("7000"); Programmatically Registering the DataSource Object In the following example, the code shows how to register, programmatically, the SQLMXDataSource object ds that was created using the preceding code with JDNI. java.util.Hashtable env = new java.util.Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "Factory class name here"); javax.naming.Context ctx = new javax.naming.InitialContext(env); ctx.
java -Dt4sqlmx.properties=file_location ... All the above said properties and configuration are applicable to the SQLMX XADataSource objects participating in distributed transactions. Connection by Using the DriverManager Class Loading and Registering the Driver Establishing the Connection Guidelines for Connections Using the Driver Manager The java.sql.DriverManager class is widely used to get a connection, but is less portable than the DataSource class.
Guidelines for Connections Using the Driver Manager ● The Type 4 driver defines a set of properties that you can use to configure the driver. For detailed information about these properties, see the Type 4 Driver Properties chapter. ● Java applications can specify the properties in the following ways (listed in the order of precedence): 1. Using the java.util.Properties parameter in the getConnection method of DriverManager class. 2. Using the database URL in the DriverManager.
● ❍ minPoolSize ❍ initialPoolSize ❍ maxStatements When used with the DriverManager class, the Type 4 driver has a connection-pool manager that determines which connections are pooled together by a unique value for the following combination of properties: url catalog schema username password blobTableName clobTableName serverDataSource Therefore, connections that have the same values for the combination of a set of properties are pooled together.
● The algorithm, "earlier used are the first to go," is used to make room for caching subsequently generated PreparedStatement objects when the number of statements reaches the maxStatements limit. ● The Type 4 driver assumes that any SQL CONTROL statements in effect at the time of execution or reuse are the same as those in effect at the time of SQL/MX compilation. If this condition is not true, reuse of a PreparedStatement object might result in unexpected behavior.
, ResultSet.CONCUR_UPDATABLE ); stmt2.executeUpdate("UPDATE cat2.sch2.table1 set j = 'update row' WHERE CURRENT OF " + st1); Internationalization (I18N) Support When String Literals Are Used in Applications Controlling String Literal Conversion by Using the Character-Set Properties Trimming Padding for Fixed-Length Character Columns Localizing Error Messages and Status Messages When String Literals Are Used in Applications Internationalization support in the driver affects the handling of string literals.
KANJI SJIS KSC5601 EUC_KR The multi-byte character set widely used on Japanese mainframes. KANJI is composed for a single-byte character set and a double-byte character set. It is a subset of Shift JIS (the double character portion). KANJI encoding is big-endian. Note: KAJNI is supported in SQL/MP tables only Double-character character set required on systems used by government and banking within Korea. KSC5601 encoding is big endian. Note: KSC5601 is supported in SQL/MP tables only.
If the translationVerification property’s value is FALSE and the driver cannot translate all or part of an SQL statement, the translation is unspecified. In most cases, the characters that are untranslatable are encoded as ISO88591 single-byte question marks (‘?’ or 0x3F). No exception or warning is thrown.
The statements parameter is set to the string: pStmt.setString(1, k1); Internally, the Type 4 driver creates an array of bytes by using the following pseudo code: byte inB = k1.getBytes(“SJIS”); int colLen = 12; // i.e. the length of the column (6) times the max length of each character (2) int padLen = colLen – inB.length; // inB.
Error detail: {1} where the message is driver_err_error_from_server_msg. The message_text is: An error was returned from the server. Error: {0} Error detail: {1} The pattern {n} inmessage_text, where n equals 1, 2, 3, and so forth, is a placeholder that is filled in at run time by the Type 4 driver. Any translation must include these placeholders. Procedure To Create a Localized-Message File 1. Extract the SQLMXMesseges_en.properties file, which is in the t4sqlmx.jar file.
Chapter 4. Type 4 Driver Properties Prev Next Chapter 4.
networkTimeout Property password Property properties Property reserveDataLocators Property roundingMode Property schema Property serverDataSource Property T4LogFile Property T4LogLevel Property translationVerification Property url Property useArrayBinding Property user Property Summary of the Type 4 Driver Properties Client-Side Properties Server-Side Properties Type 4 driver properties that effect client-side operations and server-side are summarized in the following tables.
Property Name Description Sets the initial connection pool size when connection initialPoolSize pooling is used with the Type 4 driver. (Ignored for connections made through the ConnectionPoolDataSource object.) Set the number of seconds that a physical connection can maxIdleTime remain unused in the pool before the connection is closed. Sets the maximum number of physical connections that the maxPoolSize pool can contain.
T4LogLevel Sets the logging levels that control logging output for the Type 4 driver. OFF Table 4.6. Miscellaneous Client-Side Properties Property Name description Description Specifies the registered source name. Specifies the location of the properties file that contains keyword-value pairs that specify properties property values for configuring the Type 4 driver.
useArrayBinding user Improves the performance of SELECT and INSERT statements. It is a server side False property. Sets the URL value for the MXCS None association server. How to Specify JDBC Type 4 Properties Where To Set Properties Creating and Using a Properties File Setting Properties in the Command Line Precedence of Property Specifications The Type 4 JDBC driver properties configure the driver.
property_name=property_value For example, maxStatements=1024 To configure a DataSource connection, the properties file might contain property names and values as indicated in the following list: url=jdbc:t4sqlmx://mynode.mycompanynetwork.
For more information, see order of precedence for properties specified in various ways for use with the Driver Manager.
useArrayBinding Property user Property The properties are listed in alphabetic order (with the exception of LOB Table Name Properties) together with their descriptions. blobTableName Property See LOB Table Name Properties. catalog Property The catalog property sets the default catalog used to access SQL objects referenced in SQL statements if the SQL objects are not fully qualified. Set this property on a DataSource object, ConnectionPoolDataSource object, or DriverManager object.
For example, specify the value IGNORE as follows: closeConnectionUponQueryTimeout=IGNORE connectionTimeout Property The connectionTimeout property sets the number of seconds a connection can be idle before the connection is physically closed by MXCS. Set this property on a DataSource object, ConnectionPoolDataSource object, or DriverManager object. For information about how to set properties, see How to Specify JDBC Type 4 Properties.
description Property The description property specifies the registered source name. Set this property on a DataSource object, ConnectionPoolDataSource object, or DriverManager object. For information about how to set properties, see How to Specify JDBC Type 4 Properties. Data type: String Default: none The value can be any valid identifier. initialPoolSize Property The initialPoolSize property sets the initial connection pool size when connection pooling is used with the Type 4 driver.
DriverManager object. For information about how to set properties, see How to Specify JDBC Type 4 Properties. Data type: String Default: ISO88591_1 The value can be any valid Java Canonical Name as listed in the "Canonical Name for java.io and java.lang API" column of the Sun documentation, Supported Encodings (http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html).
For more information, see Internationalization (I18N) Support. language Property The language property sets the language used for the error messages. For more information about using this property, see Localizing Error and Status Messages. Set this property on a DataSource object, ConnectionPoolDataSource object, or DriverManager object. For information about how to set properties, see How to Specify JDBC Type 4 Properties.
loginTimeout Property The loginTimeout property sets the time limit that a connection can be attempted before the connection disconnects. When a connection is attempted for a period longer than the set value, in seconds, the connection disconnects. Set this property on a DataSource object, ConnectionPoolDataSource object, or DriverManager object. For information about how to set properties, see How to Specify JDBC Type 4 Properties. Data type: int Units: seconds Default: 60 Range: 0 to java.lang.Short.
maxPoolSize Property The maxPoolSize property sets the maximum number of physical connections that the pool can contain. These connections include both free connections and connections in use. When the maximum number of physical connections is reached, the Type 4 driver throws an SQLException and sends the message, Maximum pool size is reached. Set this property on a DataSource object, ConnectionPoolDataSource object, or DriverManager object.
Performance tip: HP recommends that you enable statement pooling for your JDBC applications because this pooling can dramatically help the performance of many applications. For example, to specify statement pooling, type: maxStatements=10 The Prepared Statement Caching algorithm is updated for each SQL prepared statement, a number is assigned starting with one. The assigned number increments by one whenever the statement is prepared again.
Set this property on a DataSource object, ConnectionPoolDataSource object, or DriverManager object. For information about how to set properties, see How to Specify JDBC Type 4 Properties. Note: Be careful when using this property. A network timeout causes the socket connection between the Type 4 driver and the MXCS server to timeout.
DriverManager object. For information about how to set properties, see How to Specify JDBC Type 4 Properties. Data type: int Units: number of data locators to be reserved Default: 100 Range: 1 to 9,223,372,036,854,775,807 (2**63 -1) Do not set a value much greater than the number of data locators actually needed. If the specified value is 0 (zero) or less, the default value (100) is used. Base the setting of the value of the reserveDataLocators property on the application profile being run.
ROUND_DOWN ROUND_FLOOR ROUND_HALF_DOWN ROUND_HALF_EVEN ROUND_HALF_UP ROUND_UNNECESSARY ROUND_UP ● For the definition of rounding mode values, see to the java.math.BigDecimal documentation in http://java.sun.com/j2se/1.4.2/docs/api/index.html pages. ● If the application sets erroneous values for the roundingMode property, no error is thrown by the Type 4 driver. The driver uses ROUND_DOWN value instead.
● If the data source named in serverDataSource is not available on the MXCS server, the default server data source is used. ● If the data source named in serverDataSource is not started on the MXCS server, an SQLException is thrown. Data type: String Default: None (This value is treated as the default server data source.
current working directory, for example, in the directory from which the JVM was invoked. For detailed information about java.util.logging, see the logging summary at http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/package-summary.html. T4LogLevel Property The T4LogLevel property sets the logging levels that control logging output for the Type 4 driver. The Java package java.util.logging logs error messages and traces messages in the driver.
indicates a highly detailed tracing message. The driver provides detailed internal data messages that can be useful in debugging the Type 4 driver. ALL logs all messages. For example, to enable tracing, use the t4sqlmx.T4LogLevel property specified in the command line: -Dt4sqlmx.T4LogLevel=FINE T4LogLevel Considerations ● If a security manager is defined by your application using an AppServer, LoggingPermission must be must be granted in the java.policy file as follows: permission java.util.logging.
failure. If the translationVerification property is set to TRUE, the process can use significantly more system resources. For better performance, set this property to FALSE. For more information, see Internationalization (I18N) Support . url Property The url property sets the URL value for the MXCS association server. This property is used in the DriverManager object. The format to specify the URL is: jdbc:t4sqlmx//ip_address|machine_name:port_number/[:] [property=value[;property2=value]...
true false Data Type: String Default: false For example, specify the value true as useArrayBinding = true user Property The user property sets the Guardian user-name value for to MXCS. The Guardian user name passed must have adequate access permissions for SQL/MX data accessed through MXCS. Set this property on a DataSource object, ConnectionPoolDataSource object, or DriverManager object. For information about how to set properties, see How to Specify JDBC Type 4 Properties.
Chapter 5. Working with BLOB and CLOB Data Prev Next Chapter 5.
Updating BLOB Data Updating Blob Objects by Using the updateBlob Method Replacing Blob Objects Deleting BLOB Data NULL and Empty BLOB or Empty CLOB Value Transactions Involving Blob and Clob Access Access Considerations for Clob and Blob Objects This chapter describes working with BLOB and CLOB data in JDBC applications. You can use the standard interface described in the JDBC 3.0 API specification to access BLOB and CLOB data in NonStop SQL/MX tables with support provided by the Type 4 driver.
LOB Architecture: Tables for LOB Data Support Types of LOB Table The LOB table is a separate table from the base table that stores the LOB data. The two types of LOB table are: Binary or ASCII LOB and Unicode LOB.
and, optionally, configure the reserveDataLocators property. Specifying the LOB Table At run time, a user JDBC application notifies the Type 4 driver of the name or names of the LOB tables associated with the CLOB or BLOB columns of the base tables being accessed by the application. One LOB table or separate tables can be used for BLOB and CLOB data.
Note: ● The EMPTY_CLOB() function is an HP NonStop specific function and might not work on other databases. ● Do not use the EMPTY_CLOB() function when using the PreparedStatement interface. The Type 4 driver scans the SQL string for the EMPTY_CLOB() function and substitutes the next-available data locator. Then, obtain the handle to the empty CLOB column by selecting the CLOB column for update.
Inserting CLOB Data by Using the PreparedStatement Interface You can use the PreparedStatement interface to insert a CLOB column using ASCII or MBCS data. ASCII Data To insert a CLOB column using ASCII or MBCS data from an InputStream, use the PreparedStatement interface to insert the CLOB column. InputStream inputAsciiStream; PreparedStatement ps = conn.prepareStatement("insert into myTable (myClobColumn) values (?)"); ps.setAsciiStream(1, inputAsciiStream, length_of_data); ps.
Writing Unicode data to a CLOB column The following code illustrates how to write a Unicode data to a CLOB, after obtaining the handle to the empty CLOB column: long pos = 0; // String containing the Unicode data String s ; // Obtain the output stream to write Clob data Writer cw = myClob.setCharacterStream(pos); // write Clob data using Writer char[] myClobData = s.toCharArray(); cw.
Reading Unicode data from a CLOB Column To read Unicode or MBCS data from a CLOB column, use the CLOB interface or Reader. Using the CLOB interface: // Obtain the Clob from ResultSet Clob myClob = rs.getClob("myClobColumn"); // Obtain the input stream to read Clob data Reader cs = myClob.getCharacterStream(); // read Clob data using Reader char[] myClobData; myClobData = new char[length]; cs.
When the Clob objects differ, the Clob object in the updateClob method behaves as if the setClob method was issued. See Inserting a Clob Object with the setClob Method. Replacing Clob Objects You can replace Clob objects in the following ways: ● Use the EMPTY_CLOB() function to replace the Clob object with the empty Clob object, then insert new data as described under Inserting CLOB Columns by Using the Clob Interface. ● Use the PreparedStatement.
● Use setBinaryStream of the PreparedStatement interface to write the data to the BLOB column. Inserting a BLOB Column by Using the Blob Interface When you insert a row containing a BLOB data type, you can insert the row using an empty BLOB value before the column can be updated with real BLOB data. To insert an empty BLOB value in an SQL/MX database, specify EMPTY_BLOB() function for the BLOB column in the insert statement.
os.write(myBlobData); The Type 4 driver splits the output stream into chunks and stores the chunks in the LOB table. Inserting a BLOB Column by Using the PreparedStatement Interface To insert a BLOB column that has binary data from an InputStream, use the PreparedStatement interface: InputStream inputBinary; PreparedStatement ps = conn.prepareStatement("insert into myTable (myBlobColumn) values (?)"); ps.setBinaryStream(1, inputBinary, length_of_data); ps.
// read Blob data using the InputStream byte[] myBlobData; myBlobData = new byte[length]; is.read(myBlobData, offset, length); Updating BLOB Data Updating Blob Objects by Using the updateBlob Method Replacing Blob Objects To update BLOB data, use the methods in the Blob interface or use the updateBlob method of the ResultSet interface. The Type 4 driver makes changes to the BLOB data directly. Therefore, the Type 4 driver returns false to the locatorsUpdateCopy method of the DatabaseMetaData interface.
Deleting BLOB Data To delete BLOB data, the JDBC application uses the SQL DELETE statement to delete the row in the base table. When the row containing the BLOB column is deleted by the application, the corresponding BLOB data is automatically deleted by the delete trigger associated with the base table. For information about triggers, see Using SQL/MX Triggers to Delete LOB Data. See also NULL and Empty BLOB or CLOB Value.
the Type 4 driver closes the OutputStream or Writer that is already associated with the LOB object. Prev Chapter 4. Type 4 Driver Properties Part Number 529651-006 Up Home Next Chapter 6.
Chapter 6. Managing the SQL/MX Tables for BLOB and CLOB Data Prev Next Chapter 6.
Data Types for LOB Columns The data types for the LOB columns are: CLOB Character large object data BLOB Binary large object data Note: The CLOB and BLOB data type specification is special syntax that is allowed for use in base tables accessed by the Type 4 driver described in this manual.
Using JDBC Programs To Create Base Tables that Have LOB Columns When using a JDBC Program to create base tables that have LOB columns, put the CREATE TABLE statements in the program as you would any other SQL statement. For an example of the CREATE TABLE statement, see the discussion Using MXCI to Create Base Tables that Have LOB Columns.
URL for the Type 4 driver connection. See url Property. usr User name for the Type 4 driver connection. See user Property. password Password associated with the user. See password Property. program_options prog_option Description -help Displays help information -exec Runs the SQL statements that are generated. Generates SQL statements to create LOB tables. These statements describe the architecture of the tables -create and, therefore, provide a description of the LOB tables.
[-exec] [-create] [-trigger][-unicode] [-help] [-drop] [-out ] where -help - Display this information. -exec - Execute the SQL statements that are generated. -create - Generate SQL statements to create LOB tables. -trigger - Generate SQL statements to create triggers for . -unicode - Generate SQL statements to create unicode LOB tables . -drop - Generate SQL statements to drop triggers for . -out - Write the SQL statements to .
-exec sales.paris.pictures Backing Up and Restoring LOB Columns For basic information about backing up and restoring databases, see the SQL/MX Installation and Management Manual. That discussion describes the special considerations you must take for backing up and restoring tables that have LOB columns implemented for the Type 4 driver (because both base tables and LOB tables are involved). ● When backing up and restoring a base table, make sure that the name of the table is unchanged.
Chapter 7. Module File Caching (MFC) Prev Next Chapter 7. Module File Caching (MFC) MFC Overview Design of MFC Configuring MFC MFC Usage Scenarios MFC Tuning Recommendations MFC Limitations Statement Caching MFC Overview The applications, which use JDBC T4 driver, face repeated SQL compiles while using prepared statements. To overcome this issue, a driver side Most Frequently Used (MFU) cache is used. However, the current design of the driver side cache consumes large amount of memory.
Configuring MFC For information on configuring MFC, see the HP NonStop SQL/MX Connectivity Service Manual. MFC Usage Scenarios The benefits of lower processor and memory utilization mentioned below are applicable on the NonStop Server. ● JDBC T4 applications using java.sql.Connection.prepareStatement() have the benefit of lower processor utilization, lower memory consumption, and better response time.
to that of the T4 driver cache with MFC consuming lesser memory. In such applications, when a small number of connections are configured per processor, configure only the JDBC T4 driver cache because there is no major difference between MFC and the T4 driver cache. For applications with small number of queries, Driver Side Cache (DSC) provides better response time.
Chapter 8. Type 4 Driver Compliance Prev Next Chapter 8.
CallableStatement.getArray(int parameterIndex) CallableStatement.getArray(String parameterName) CallableStatement.getBlob(int parameterIndex) CallableStatement.getBlob(String parameterName) CallableStatement.getClob(int parameterIndex) CallableStatement.getClob(String parameterName) The particular CallableStatement method is not supported. CallableStatement.getObject(int parameterIndex, Map map) CallableStatement.getObject(String parameterName, Map map) CallableStatement.
PreparedStatement.setBlob(int parameterIndex, Blob x) The particular PreparedStatement methods are not supported for access of SQL/MP user PreparedStatement.setClob(int parameterIndex, Clob x) tables only. ResultSet.getBlob(int columnIndex) ResultSet.getBlob(String columnName) ResultSet.getClob(int columnIndex) ResultSet.getClob(String columnName) The particular ResultSet methods are not supported for access of SQL/MP user tables only. ResultSet.updateBlob(int columnIndex) ResultSet.
Method javax.sql.RowSet javax.sql.RowSetInternal Comments RowSet is not implemented in the JDBC Driver for SQL/MX. You can, however, download reference javax.sql.RowSetListener implementation of RowSet from Sun Microsystems javax.sql.RowSetMetaData (http://developer.java.sun.com/developer/earlyAccess/crs/). javax.sql.RowSetReader javax.sql.RowSetWriter For additional information about deviations for some methods, see Deviations.
The Type 4 driver does not support the scroll-sensitive result set type, so an SQLWarning is issued if an java.sql.Connection.createStatement(...)java.sql.Connection.prepareStatement(...) application requests that type. The result set is changed to a scroll-insensitive type. The read-only attribute is ignored. java.sql.Connection.setReadOnly(...) The fetch direction attribute is ignored. java.sql.ResultSet.setFetchDirection(...) Because SQL/MX parses the escape syntax, disabling java.sql.Statement.
For another example, schema is the attribute in the parameter schemaPattern, which is a parameter to the java.sql.ResultSet.getAttributes method. public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException If the application passes a null value, the null is treated as follows: ● If a parameter name contains the suffix Pattern, the null is interpreted as a % wildcard.
Yes NUMERIC(p,s) Types.NUMERIC Yes FLOAT(p) Types.REAL No N.A. Types.REF Yes SMALLINT Types.SMALLINT No N.A. Types.STRUCT Yes TIME Types.TIME Yes TIMESTAMP Types.TIMESTAMP Data type is mapped by SQL/MX . Data type varies from that used for table creation. SMALLINT Types.TINYINT Data type is mapped by SQL/MX . Data type varies from that used for table creation. VARCHAR(n)¹ Types.VARBINARY Yes VARCHAR(n) Types.VARCHAR Data type is mapped by SQL/MX . Data type varies from that used for table creation.
SQLJ Support The Type 4 driver supports non-customized SQLJ applications, but does not support customized SQLJ applications.
● Retrieval of auto generated keys. ● Transform group and type mapping. ● Relationship between connector architecture and JDBC 3.0 SPI. ● Secured socket communication or encryption for the interaction between the NonStop JDBC Type 4 Driver and MXCS. ● Security context (user name and password) implicit propagation from AppServer to the NonStop JDBC Type 4 Driver. ● IPV6 protocol stack.
Chapter 9. Tracing and Logging Facilities Prev Next Chapter 9.
driver. It also allows you to capture error and warning messages. In addition to the standard JDBC tracing and logging facility, the Type 4 driver provides an independent logging facility (Type 4 Driver Logging).
node-name is the name of the NonStop server node. server-name is the Guardian name of the server. port-number is the port to which the server is connected. For example: TCP:\banshee-tcp.$Z0133/46003:NonStopODBC dialogue-id If applicable, the dialogue-id used for the MXCS connection. class If applicable, the name of the class that issued the logging request. method If applicable, the name of the method that issued the logging request. parameters An optional set of parameters associated with the method.
Part Number 529651-006 Legal Notices
Chapter 10. Migration and Compatibility Prev Next Chapter 10. Migration and Compatibility JDBC Drivers Third-Party Databases Operating Systems Compatibility JDBC Drivers Driver You Are Migrating From Code Changes Configuration Changes JDBC Type 3 Driver No JDBC Driver for SQL/MX (JDBC/MX), No a Type 2 driver SequeLink JDBC Driver No NonStop JDBC Type 4 No Driver version 1.
Third-Party Databases Applications must be compatible with features and data types supported by SQL/MX. Any application using specific features and data types customized for third-party databases must be modified to work with the Type 4 driver. For features and data types supported by SQL/MX, see the SQL/MX Reference Manual.
Chapter 11. Messages Prev Next Chapter 11. Messages About the Message Format Type 4 Driver Error Messages About the Message Format Messages are listed in numerical SQLCODE order. Descriptions include the following: SQLCODE SQLSTATE message-text Cause [ What occurred to trigger the message.] Effect [ What is the result when this occurs. ] Recovery [ How to diagnose and fix the problem. ] Type 4 Driver Error Messages 29001 HYC00 Unsupported feature - {0} Cause.
Effect. SQLMXConnection.setTransactionIsolation does not set the transaction isolation value. Recovery. Valid isolation values are: SQL_TXN_READ_COMMITTED, SQL_TXN_READ_UNCOMMITTED, SQL_TXN_REPEATABLE_READ, and SQL_TXN_SERIALIZABLE. If no isolation value is specified, the default is SQL_TXN_READ_COMMITTED. 29005 HY024 Invalid ResultSet type Cause. An attempt was made to set an invalid ResultSet Type value. Effect. The SQLMXStatement call with the resultSetType parameter fails. Recovery.
29010 07009 Invalid column name Cause. A column search does not contain columnName string. Effect. The column comparison or searches do not succeed. Recovery. Supply a valid columnName string to the findColumn(), validateGetInvocation(), and validateUpdInvocation() methods. 29011 07009 Invalid column index or descriptor index Cause. A ResultSet method was issued that has a column parameter that is outside of the valid range. Effect. The ResultSet method data is not returned as expected. Recovery.
Effect. Strings that are obtained through a getter method cannot be cast to the method type. Recovery. Validate the string in the database to make sure it is a compatible type. 29019 07002 Parameter {0, number, integer} for {1, number, integer} set of parameters is not set Cause. An input descriptor contains a parameter that does not have a value set. Effect. The method checkIfAllParamsSet() reports the parameter that is not set. Recovery. Set a value for the listed parameter.
Cause. An attempt was made to set transaction isolation level while a transaction was active. Effect. Attempts to change the transaction isolation level for this Connection object fail. Recovery. Complete the transaction, then attempt to set the transaction isolation level. 29031 HY000 SQL SELECT statement in batch is illegal Cause. A SELECT SQL statement was used in the executeBatch() method. Effect. An exception is reported; the SELECT SQL query cannot be used in batch queries. Recovery.
Recovery. TYPE_FORWARD_ONLY ResultSet object type cursors can move forward only. TYPE_SCROLL_SENSITIVE and TYPE_SCROLL_INSENSITIVE types are scrollable. 29038 HY107 Row number is not valid Cause. A ResultSet absolute() method was called when the row number was set to 0. Effect. The cursor is not moved to the specified row number. Recovery.
29044 HY000 Query timeout value is not valid Cause. An attempt was made to set a value of less than 0 for the number of seconds the driver waits for a Statement object to execute. Effect. The query timeout limit is not set. Recovery. For the setQueryTimeout() method, supply a valid value that is greater than or equal to 0. 29045 01S07 Fractional truncation Cause. The data retrieved by the ResultSet getter method has been truncated. Effect. The data retrieved is truncated. Recovery.
service provider. 29051 01S02 ResultSet type changed to TYPE_SCROLL_INSENSITIVE Cause. The Result Set Type was changed. Effect. None. Recovery. This message is reported as an SQL Warning. It is an informational message only; no recovery is needed. 29053 HY000 SQL SELECT statement is invalid in executeUpdate() method Cause. A select SQL statement was used in the executeUpdate() method. Effect. The SQL query not performed exception is reported. Recovery.
or the property is set to an invalid value. Effect. The application cannot access BLOB columns. Recovery. Set the t4sqlmx.blobTableName property to a valid LOB table name. The LOB table name is of format catalog.schema.lobTableName. 29060 HY000 't4sqlmx.clobTableName' property is not set or set to null value or set to invalid value Cause. Attempted to access a CLOB column without setting the propertyt4sqlmx.clobTableName property, or the property is set to null value or set to an invalid value. Effect.
Effect. The application cannot access LOB columns. Recovery. Disable the autocommit mode. 29100 HY000 An internal error occurred. Cause. Internal error. Effect. Operation fails. Recovery. None. Report the entire message to your service provider. 29101 HY000 Contact your HP service provider. Cause. Internal error. Effect. Operation fails. Recovery. None. Report the entire message to your service provider. 29102 HY000 Error while parsing address address Cause. The address format was not recognized. Effect.
Recovery. This is an informational message. Refer to url Property for the valid address format. 29107 HY000 Address not long enough to be a valid address. Cause. The address length was too short to be a valid address. Effect. Operation fails. Recovery. Refer to url Property for the valid address format. 29108 HY000 Expecting \\/. Cause. The MXCS address format was invalid. Effect. Operation fails. Recovery.
Cause. Socket error. Effect. The operation fails. Recovery. Use the getCause method on the Exception to determine the appropriate recovery action. 29114 HY000 Error while writing to socket. Cause. Socket write error. Effect. The operation fails. Recovery. Use the getCause method on the Exception to determine the appropriate recovery action. 29115 HY000 Error while reading from socket. Cause: cause Cause. Socket read error. Effect. The operation fails. Recovery.
Effect. Operation fails. Recovery. Evaluate the returned value from the getCause method on the Exception to determine the appropriate recovery action. 29121 HY000 A close message error occurred. Cause: cause Cause. Unable to perform this operation. Effect. Operation fails. Recovery. Evaluate the returned value from the getCause method on the Exception to determine the appropriate recovery action. 29122 HY000 An end transaction message error occurred. Cause. Unable to perform the operation. Effect.
Recovery. Evaluate the returned value from the getCause method on the Exception to determine the appropriate recovery action. 29127 HY000 An execute rowset message error occurred. Cause: cause Cause. Unable to perform this operation. Effect. Operation fails. Recovery. Evaluate the returned value from the getCause method on the Exception to determine the appropriate recovery action. 29128 HY000 A fetch perf message error occurred. Cause: cause Cause. Unable to perform this operation. Effect. Operation fails.
29133 HY000 A prepare rowset message error occurred. Cause: cause Cause. Unable to perform this operation. Effect. Operation fails. Recovery. Evaluate the returned value from the getCause method on the Exception to determine the appropriate recovery action. 29134 HY000 A set connection option message error occurred. Cause: cause Cause. Unable to perform this operation. Effect. Operation fails. Recovery.
Cause. Unable to perform this operation. Effect. Operation fails. Recovery. Evaluate the returned value from the getCause method on the Exception to determine the appropriate recovery action. 29140 HY000 An execute direct reply error occurred. Cause. Unable to perform this operation. Effect. Operation fails. Recovery. Evaluate the returned value from the getCause method on the Exception to determine the appropriate recovery action. 29141 HY000 An execute direct rowset reply error occurred. Cause.
Recovery. Evaluate the returned value from the getCause method on the Exception to determine the appropriate recovery action. 29146 HY000 A get sql catalogs reply error occurred. Cause. Unable to perform this operation. Effect. Operation fails. Recovery. Evaluate the returned value from the getCause method on the Exception to determine the appropriate recovery action. 29147 HY000 An initialize dialogue reply error occurred. Cause. Unable to perform this operation. Effect. Operation fails. Recovery.
29152 HY000 No more ports available to start ODBC servers Cause. Unable to perform this operation. Effect. Operation fails. Recovery. See the Operator Messages Manual for server errors. Evaluate the returned value from the getCause method on the Exception to determine the appropriate recovery action. 29153 HY000 Invalid authorization specification Cause. Incorrect user name and/or password. Effect. Operation fails. Recovery. Retry with correct user name and/or password. 29154 HY000 Timeout expired Cause.
Cause. The server's version differs from the expected version. Effect. Operation fails. Recovery. Evaluate any error or error detail information accompanying the message. Install compatible versions of the driver and MXCS server. 29159 HY000 The message header contained the wrong signature. Expected: expected_signature Actual: actual_signature Cause. The server's signature differs from the expected version. Effect. Operation fails. Recovery.
Recovery. Create server data source and/or configure server data source with more servers. 29165 HY000 Unknown connect reply error: error Cause. A message returned by the server. Effect. Operation fails. Recovery. Evaluate any error or error detail information accompanying the message. Check the EMS event log for server errors. See the Operator Messages Manual for server errors. See the SQL/MX Connectivity Service Manual for corrective action. 29166 HY000 This method is not implemented. Cause.
in the {0} replacement variable. Effect. The method fails. Recovery. Set the parameter to use characters within the appropriate character set. You can also turn off translation validation by setting the translationVerification property to FALSE. 29173 HY000 Translation of SQL statement {0} failed. Cause. Translation errors occurred when translating the SQL statement into the target character set reported in the {0} replacement variable. Effect. The method fails. Recovery.
Recovery. Reconnect. Set connection timeout to appropriate value. 01056 25000 Invalid transaction state. Cause. Transaction state is incorrect. Effect. Operation fails. Recovery. Retry. 01118 S1008 Operation cancelled. Cause. The operation was cancelled. Effect. Operation fails. Recovery. Retry operation. 08001 HY000 Retry attempts to connect to the datasource failed, May be ODBC server not able to register to the ODBC service process. Cause. A server error. Effect. Operation fails. Recovery.
Effect. The application cannot create more connections to the data source. Recovery. Evaluate any error or error detail information; check the maximum number of connections that are allowed. 29183 HY000 Invalid XAFLAG values sent to the XABROKER. Broker Message: {0} Cause. An invalid flag sent to the XABROKER for a transaction operation. Effect. Operation fails. Recovery. Evaluate any error or error detail information; use a proper flag for the attempted operation.
Cause. The feature listed is not supported by the JDBC driver. Effect. An attempt was made to perform an invalid Tx operation. Recovery. Ensure that a proper Transaction operation is performed. 29190 HY000 Invalid XA Connection. - {0} Cause. There is no connection to the server. Effect. The operation fails. Recovery.. Verify all the properties to the database are valid. S1000 HY000 A TIP transaction error error has been detected. Check the server event log on Node node for Transaction Error details. Cause.
Cause. The long running query timed out after specified number of seconds. Effect. The MXOSRVR on NSK could did not stop successfully. Recovery. None. The corresponding MXOSRVR to be stopped is unavailable. 29195 HY000 SQL Server and connection could not be aborted successfully, SERVER IN USE BY ANOTHER CLIENT ERROR (closeConnectionUponQueryTimeout Enabled). Cause. The long running query timed out after specified number of seconds. Effect. The MXOSRVR on NSK did not stop successfully. Recovery. None.
Chapter 12. Using Type 4 Driver With WebLogic Server(WLS) 8.1 Prev Next Chapter 12. Using Type 4 Driver With WebLogic Server(WLS) 8.
is located at the following URL: http://edocs.bea.com/wls/docs81/index.html. This section discusses features of BEA WLS 8.1 that apply to use with the Type 4 driver. Compatibility The Type 4 driver is compatible with BEA WLS version 8.1 or later. The Type 4 Driver is not tested with the later versions of BEA WLS 8.1. Transactions The Type 4 Driver can be used under the control of BEA WLS 8.1 to manage transactions.
BEA WLS 8.
Connection and Statement Pooling The Type 4 driver supports all interfaces required for WLS 8.1 connection pooling and statement pooling. A WLS 8.1 JDBC sample is provided with the Type 4 driver product for demonstrating connection pooling and integration. WLS8.1 implements the connection pooling component. The WLS8.1 application server maintains the cache of pooled objects, and retrieves an object when the client requests a connection.
To enable WLS 8.1 application servers to manage the connection pool, the Type 4 driver provides methods that get and set connection pool configuration properties as per the JDBC 3.0 specification. Prev Chapter 11. Messages Part Number 529651-006 Up Home Next Appendix A.
Appendix A. Sample Programs Accessing CLOB and BLOB Data Prev Next Appendix A. Sample Programs Accessing CLOB and BLOB Data Sample Program Accessing CLOB Data Sample Program Accessing BLOB Data This appendix shows two working programs. Sample Program Accessing CLOB Data This sample program shows operations that can be performed through the Clob interface or through the PreparedStatement interface.
// - use Outputstream.write(byte[]) // // ***** The following is the PreparedStatement interface... // - need an Inputstream object that already has data // - need a PreparedStatement object that contains the // 'insert...' DML of the base table // - ps.setAsciiStream() for the lob data // - ps.executeupdate(); for the DML // // To run this example, issue the following: // # java TestCLOB 1 TestCLOB.java 1000 // import java.sql.*; import java.io.
int clobFsLen = clobFs.available(); if (args.length == 3) length = Integer.parseInt(args[2]); recKey = Integer.parseInt(args[0]); System.out.println("Key: " + recKey +"; Using " + length + " of file " + args[1]); try { Class.forName("com.tandem.t4jdbc.SQLMXDriver"); start = System.currentTimeMillis(); //url should be of the form: // jdbc:t4sqlmx://ip_address|machine_name:port_number/:” String url = “jdbc:t4sqlmx://mymachine:6000/:”; conn1 = DriverManager.getConnection(url); System.out.
e.printStackTrace(); SQLException next = e; do { System.out.println("Messge : " + e.getMessage()); System.out.println("Error Code : " + e.getErrorCode()); System.out.println("SQLState : " + e.getSQLState()); } while ((next = next.getNextException()) != null); } // Clob interface example - This technique is suitable when // the LOB data is already in the app, such as having been // transferred in a msgbuf. try { // insert a second base table row with an empty LOB column System.out.
} System.out.println("Vendor Code : " + e.getErrorCode()); System.out.println("SQLState : " + e.getSQLState()); while ((next = next.getNextException()) != null); } } // main } // class Sample Program Accessing BLOB Data This sample program shows the use of both the Blob interface and the PreparedStatement interface to take a byte variable and put the variable's value into a base table that has a BLOB column. // LOB operations may be performed through the Blob, or // PreparedStatement interface.
// // To run this example, issue the following: // # java TestBLOB 1 TestBLOB.class 1000 // import java.sql.*; import java.io.*; public class TestBLOB { public static void main (String[] args) throws java.io.FileNotFoundException, java.io.IOException { int numBytes; int recKey; long start; long end; Connection conn1 = null; // Set t4slqmx.blobTableName System Property. This property // can also be added to the command line through // "-Dt4slqmx.blobTableName=...", or a // java.util.
recKey = Integer.parseInt(args[0]); System.out.println("Key: " + recKey +"; Using " + numBytes + " of file " + args[1]); try { Class.forName("com.tandem.t4jdbc.SQLMXDriver"); start = System.currentTimeMillis(); //url should be of the form: // jdbc:t4sqlmx://ip_address|machine_name:port_number/: String url = "jdbc:t4sqlmx://mymachine:port/:"; String user ="UserName"; String password="password"; conn1 = DriverManager.getConnection(url,user,password); System.out.println("Cleaning up test tables...
} System.out.println("SQLState : " + e.getSQLState()); while ((next = next.getNextException()) != null); } // Blob interface example - This technique is suitable when // the LOB data is already in the app, such as having been // transfered in a msgbuf. try { // insert a second base table row with empty LOB column System.out.println("BLOB interface LOB insert..."); String stmtSource2 = "insert into blobtiff values (?,EMPTY_BLOB())"; PreparedStatement stmt2 = conn1.prepareStatement(stmtSource2); stmt2.
} // class Prev Chapter 12.Using Type 4 Driver With WebLogic Server(WLS) 8.
Appendix B. Scalar Functions Prev Next Appendix B. Scalar Functions This appendix contains a list of scalar functions that are not supported by Module File Caching (MFC): ABS ACOS ASCII ASIN ATAN ATAN2 AVG CEILING CHAR CHAR_LENGTH CODE_VALUE CONCAT CONVERTTIMESTAMP COS COSH COUNT CURRENT CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER DATEFORMAT DAY DAYNAME DAYOFMONTH DAYOFWEEK DAYOFYEAR DIFF1 DIFF2 EXP EXTRACT FLOOR HOUR INSERT JULIANTIMESTAMP LASTNOTNULL LCASE LEFT LOCATE LOG Prev Appendix A.
Glossary Prev Next Glossary A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z A abstract class In Java, a class designed only as a parent from which subclasses can be derived, which is not itself suitable for instantiation. An abstract class is often used to "abstract out" incomplete sets of features, which can then be shared by a group of sibling subclasses that add different variations of the missing pieces.
See American Standard Code for Information Interchange (ASCII). autocommit mode A mode in which a JDBC driver automatically commits a transaction without the programmer's calling commit(). B base table A table that has physical existence: that is, a table stored in a file. BLOB Short for Binary Large OBject, a collection of binary data stored as a single entity in a database management system. These entities are primarily used to hold multimedia objects such as images, videos, and sound.
server. Often, the client is a process residing on a programmable workstation and is the part of a program that provides the user interface. The workstation client might also perform other portions of the program logic. Also called a requester. CLOB Short for Character Large OBject, text data stored as a single entity in a database management system. A Java Clob object (Java type, java.sql.Clob) corresponds to the SQL CLOB data type.
A logical name that defines the information required to access data. ● On the client side, it defines the driver name, network address, and specific attributes such as catalog and schema names. ● On the server side, it defines startup values, number of servers in a pool, Guardian defines, SQL/MX control statements, and resource management policies. On the server side, data source is referred to through the serverDataSource property. DCL See Data Control Language (DCL).
F fault tolerance The ability of a computer system to continue processing during and after a single fault (the failure of a system component) without the loss of data or function. G get() method A method used to read a data item. For example, the Connection.getAutoCommit() method returns the transaction mode of the JDBC driver's connection to an SQL/MX database. Compare to set() method. Guardian An environment available for interactive and programmatic use with the NonStop Kernel.
HP NonStop SQL/MP (SQL/MP) HP NonStop Structured Query Language/MP, the HP relational database management system for NonStop servers. HP NonStop SQL/MX (SQL/MX) HP NonStop Structured Query Language/MX, the HP next-generation relational database management system for business-critical applications on NonStop servers. HP NonStop system HP computers (hardware and software) that support the NonStop Kernel operating system.
In general, the point of communication or interconnection between one person, program, or device and another, or a set of rules for that interaction. See also API. International Electrotechnical Commission (IEC) A standardization body at the same level as ISO. International Organization for Standardization (ISO) A voluntary, nontreaty organization founded in 1946, responsible for creating international standards in many areas, including computers and communications.
A Java Archive file, produced by the Java Archive Tool, jar. java The Java interpreter, which executes Java bytecode. Also, the command to run the Java interpreter. The Java command invokes the Java Run-Time. Java Database Connectivity (JDBC) An industry standard for database-independent connectivity between the Java platform and relational databases such as SQL/MP or SQL/MX. JDBC provides a call-level API for SQL-based database access.
JDBC API The programmatic API in Java to access relational databases. JDBC Trace Facility A utility designed to trace the entry point of all the JDBC methods called from the Java applications. JDBC/MP See HP JDBC Driver for SQL/MP (JDBC/MP). JDBC/MX See HP JDBC Driver for SQL/MX (JDBC/MX). JDK See Java Development Kit (JDK). JNDI See Java Naming and Directory Interface (JNDI). JNI See Java Native Interface (JNI). jre The Java run-time environment, which executes Java bytecode.
kilometer), allowing easy interconnection of terminals, microprocessors, and computers within adjacent buildings. Ethernet is an example of a LAN. M MXCI SQL/MX Conversational Interface. MXCS The HP NonStop SQL/MX Connectivity Service. This product enables applications developed for the JDBC application programming interface and other connectivity APIs to use HP NonStop SQL/MX to access HP NonStop SQL databases on an HP NonStop system.
O ODBC See Open Database Connectivity (ODBC). Open Database Connectivity (ODBC) The standard Microsoft product for accessing databases. Open System Services (OSS) An environment available for interactive and programmatic use with the NonStop Kernel. Processes that run in the OSS environment use the OSS API. Interactive users of the OSS environment use the OSS shell for their command interpreter. Compare to Guardian. OSS See Open System Services (OSS).
and so on. Q There are no entries for this section. R RDF See Remote Duplicate Database Facility (RDF).
An instantiation of the SQL executor with its own environment. SQLJ Also referred to as SQLJ Part 0, the "Database Language SQL--Part 10: Object Language Bindings (SQL/OLB)" part of the ANSI SQL-2002 standard that allows static SQL statements to be embedded directly in a Java program. SQL/MP See HP NonStop SQL/MP. SQL/MX See HP NonStop SQL/MX. statement pooling A framework for pooling PreparedStatement objects.
throws Java keyword used to define the exceptions that a method can raise. TMF See HP NonStop Transaction Management Facility (TMF) transaction A user-defined action that a client program (usually running on a workstation) requests from a server. Transaction Management Facility (TMF) See HP NonStop Transaction Management Facility (TMF) trigger A trigger defines a set of actions that are executed automatically whenever a delete, insert, or update operation occurs on a specified base table.
W World Wide Web (WWW) An Internet client-server hypertext distributed information retrieval system that originated from the CERN High-Energy Physics laboratories in Geneva, Switzerland. On the WWW everything (documents, menus, indexes) is represented to the user as a hypertext object in HTML format. Hypertext links refer to other documents by their URLs.
Index Prev Index A Abbreviations in this manual, Abbreviations Access considerations Blob and Clob objects, Access Considerations for Clob and Blob Objects API, Communication Overview (see also Java API) layer, Communication Overview Appendix A, Sample Programs Accessing CLOB and BLOB Data Appendix B, Scalar Functions Architecture LOB support, Architecture for LOB Support Type 4 driver, Type 4 Driver Architecture ASCII data PreparedStatement interface, ASCII Data reading, Reading ASCII Data from a CLOB Col
sample applications, Samples supported transactions , BEA WLS 8.1 Supported Transaction Scenario unsupported transactions , BEA WLS 8.
C catalog property, catalog Property Changes, What's New in This Guide Character padding, How the Padding Character Causes the Discrepancy in Length Character-set properties use, Controlling String Literal Conversion by Using the Character-Set Properties using, Using the Character-Set Properties Character sets ISO8859/2 through ISO8859/9, Unsupported SQL/MP Features SQL/MX, Controlling String Literal Conversion by Using the Character-Set Properties CLASSPATH environment variable, Setting CLASSPATH Client co
updating, Updating CLOB Data working with, Working with BLOB and CLOB Data Clob interface inserting CLOB columns, Inserting CLOB Columns by Using the Clob Interface writing ASCII or MBCS data, ASCII Data Clob object inserting, Inserting a Clob Object by Using the setClob Method Replacing, Replacing Clob Objects clobTableName property description, LOB Table Name Properties setting, Specifying the LOB Table Columns character, fixed-length, Trimming Padding for Fixed-Length Character Columns Communication over
minPoolSize property, minPoolSize Property Connections components, Accessing a Database with the Type 4 Driver closeConnectionUponQueryTimeout property, closeConnectionUponQueryTimeout Property connectionTimeout property, connectionTimeout Property loginTimeout property, loginTimeout Property maxIdleTime property, maxIdleTime Property connectionTimeout property, connectionTimeout Property Connection and Statement Pooling, Connection and Statement Pooling create option, program_options CREATE TABLE statement
deploying, Overview of Tasks to Deploy DataSource Objects Data sources configuring, Programmatically Creating an Instance of the DataSource Class configuring, MXCS XA Data Source creating, JDBC Data Source (client-side) dataSourceName property, dataSourceName Property log writer, Standard JDBC Tracing and Logging Facility MXCS (server-side), MXCS Data Source (server-side) object properties, DataSource Object Properties overview of, Data Sources programmatically creating an instance, Programmatically Creatin
related reading, Related Reading SQL/MX, NonStop System Computing Documents Driver class, Loading and Registering the Driver DriverManager class connection-pool participants, Connection Pooling getting a connection, Connection by Using the DriverManager Class guidelines , Guidelines for Connections Using the Driver Manager log writer, Standard JDBC Tracing and Logging Facility setting properties, Where To Set Properties Drivers migration, JDBC Drivers drop option, program_options E EMPTY_BLOB() function de
G getConnection() method DataSource object, Retrieving a DataSource Instance by using JNDI and to the Data Source DriverManager class, Establishing the Connection Glossary, Glossary Guardian ID, Security user name, Security user name, specifying, user Property H help option, program_options HP extensions, HP Extensions I I18N (see Internationalization support) IDL layer, Communication Overview initialPoolSize property description, initialPoolSize Property InputStream current object, Access Considerations
ISO88591_1 Java encoding set, Controlling String Literal Conversion by Using the Character-Set Properties ISO88591 property description, ISO88591 Property using, Controlling String Literal Conversion by Using the Character-Set Properties J Java encoding sets, Controlling String Literal Conversion by Using the Character-Set Properties JDK version, Installation Requirements java command-line, Setting Properties in the Command Line Java API documents, Sun Microsystems Documents prerequisite, Is This Document
K KANJI columns inserts, How the Padding Character Causes the Discrepancy in Length KANJI property description, KANJI Property using, Controlling String Literal Conversion by Using the Character-Set Properties KSC5601 property description, KSC5601 Property using, Controlling String Literal Conversion by Using the Character-Set Properties L language property, language Property Lob Admin utility description, Managing LOB Data by Using the Lob Admin Utility displaying help, Help Listing from the Type 4 Lob Ad
partitioning, Creating LOB Tables setting properties for, Setting Properties for the LOB Table specifying, Specifying the LOB Table types, Types of LOB Table Localizing messages, Localizing Error Messages and Status Messages locatorsUpdateCopy method, Updating BLOB Data Logging facilities, Tracing and Logging Facilities levels, Logging Levels message format, Message Format output examples, Examples of Logging Output properties for, Client-Side Properties standard facilities, Standard JDBC Tracing and Loggin
internationalization of, Internationalization of Messages language property, language Property localized file, File-Name Format for the Localized-Messages File localizing, Localizing Error Messages and Status Messages Type 4 driver, Messages Migration, Migration minPoolSize property, minPoolSize Property Module File Caching configuration of, Configuring MFC design of, Designing MFC limitations of, Limitations overview, MFC Overview tuning recommendations, Tuning Recommendations usage scenarios, Usage Scenar
P password authentication, Security property, password Property Platforms, Client Platforms Supported Pooling, Client-Side Properties (see also Connection pooling) enabling, maxPoolSize Property management properties, Client-Side Properties Precedence property specifications, Precedence of Property Specifications PreparedStatement interface inserting a Blob, Inserting a BLOB Column by Using the PreparedStatement Interface inserting CLOB data, Inserting CLOB Data by Using the PreparedStatement Interface stat
driver , Loading and Registering the Driver Replacing Clob objects, Replacing Clob Objects Requirements for client platform, Client Platforms Supported for NonStop server, Type 4 Driver Architecture hardware, Installation Requirements JDK version, Installation Requirements NonStop system, Installation Requirements reserveDataLocators Property description, reserveDataLocators Property Reserving data locators, Reserving Data Locators Restoring LOB columns, Backing Up and Restoring LOB Columns Restrictions, Re
name, traced, Message Format properties, Server-Side Properties serverDataSource property, serverDataSource Property setClob Method inserting, Inserting a Clob Object by Using the setClob Method setLogWriter method, Standard JDBC Tracing and Logging Facility SJIS Java encoding set, Controlling String Literal Conversion by Using the Character-Set Properties Socket connection, networkTimeout Property SPJs (Stored procedures in Java) -spj, program options SQL/MP features, Unsupported SQL/MP Features SQL/MP tab
description, Statement Pooling guidelines, Guidelines for Statement Pooling maxStatements property, maxStatements Property troubleshooting, Troubleshooting Statement Pooling Stored procedures description, Stored Procedures SQL/MP, Unsupported SQL/MP Features Storing BLOB data, Storing BLOB Data CLOB data, Storing CLOB Data String literals controlling conversion, Controlling String Literal Conversion by Using the Character-Set Properties use, When String Literals Are Used in Applications Sun Microsystems doc
facilities, Tracing and Logging Facilities properties for, Client-Side Properties standard facilities, Standard JDBC Tracing and Logging Facility Transaction control statements SQL/MP, Unsupported SQL/MP Features SQL/MX, Unsupported NonStop SQL Features Transactions Blob and Clob access, Transactions Involving Blob and Clob Access translationVerification property description, translationVerification Property Transport layer, Communication Overview trigger option, program_options Triggers deleting LOB data,
other unsupported features, Other Unsupported Features product files, Product Files restrictions, Restrictions using character-set properties, Controlling String Literal Conversion by Using the Character-Set Properties version 1.
SQL/MP, Unsupported SQL/MP Features SQL/MX, Unsupported NonStop SQL Features Unicode insert, Inserting a CLOB column with Unicode data using a Reader reading, Reading Unicode data from a CLOB Column -unicode, program options writing, Writing Unicode data to a CLOB column Update where current of, "Update ...
related reading, Related Reading Writer current object, Access Considerations for Clob and Blob Objects Writing ASCII data, Writing ASCII or MBCS Data to a CLOB Column Binary data, Writing Binary Data to a BLOB Column MBCS data, Writing ASCII or MBCS Data to a CLOB Column Prev Glossary Part Number 529651-006 Up Home Legal Notices