码迷,mamicode.com
首页 > 数据库 > 详细

JDBC Install for OSS

时间:2015-06-30 20:03:42      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:

JDBC Install for OSS

 
1. The default JDBC/MX driver installation directory laction is
  1. /usr/tandem/jdbcMx/T1275h50.
  2. include:
  3. /demo          //Demo programs.
  4. /lib/libjdbcMx.so   //driver library
  5. /lib/jdbcMx.jar      //Java archive file, which includes the JDBC trace facility
  6. /bin/jdbcMxInstall   //installation script
  7. /bin/jdbcMxUninstall   //uninstall script
 
2. Verify the version of the JDBC/MX driver, use these commands:
Java command, which displays the version of the java code portion of the JDBC/MX driver
Vproc command, which displays the version of the C code portion of the JDBC/MX driver
To use the java command, type the following at the OSS prompt: This command displays output similar to:
java JdbcMx -version
JDBC driver for NonStop(TM) SQL/MX Version
T127H50_23DEC2005_JDBCMX...
Compare the output with the product numbers in the Softdoc file on the NonStop Server for Java 5
distribution CD.
Use the vproc command to check for the correct library. Issue the following at the OSS prompt:
 
vproc /jdbcmx-installation-directory/T1275H50/lib/libjdbcMx.so
...
Binder timestamp: 20DEC2005 18:10:14
Version procedure: T1275H50_23DEC2005_JDBCMX_1220
TNS/E Native Mode: runnable file
The version procedure that corresponds to the JDBC/MX Driver (T1275) product should match in the
output of both the java and vproc commands.
 
3. set CLASSPATH
  1. echo $CLASSPATH
  2. export JAVA_HOME=/usr/tandem/java
  3. export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:/usr/tandem/jdbcMx/current/lib/jdbcMx.jar:/home/ecui/java/test/jta.jar
 
4. set  _RLD_LIB_PATH
  1. export _RLD_LIB_PATH=/usr/tandem/jdbcMx/T1275H50/lib
5.
Before running the JDBC application that uses BLOB and CLOB data through the JDBC API, the database administrator must create the LOB tables.  or information on creating LOB tables, see Managing LOB Data with the JDBC/MX Lob Admin Utility.
 
6.
Before using the procedure to create the tables, note that when using MXCI to create base tables, you must enter
the following special command in the MXCI session to enable the base table creation of tables that have LOB
(BLOB or CLOB) columns:
CONTROL QUERY DEFAULT JDBC_PROCESS ‘TRUE‘
 
7.
To specify 200 transactions per process, use the following command.
  1. export JAVA_PTHREAD_MAX_TRANSACTIONS=200
 You cannot make procedure calls to TMF directly from any Java application. You must use either the com.tandem.tmf.Current class or the Java Transaction API (JTA) to manage transactions.
 
 
8. use the properties
  1. java -Djdbcmx.transactionMode=external Test
 
mixed
Specifies that the driver inherits any active transaction in the current thread. The autocommit setting of the transaction is ignored. The application must either commit or rollback the transaction in this mode. If there is no active transaction, the driver creates one and begins the transaction, or aborts it if there is an SQL error. In this mode, the driver supports both autocommit and non-autocommit. The application ends the transaction in non-autocommit mode.

 

 
external
Specifies that if an external transaction exists, transactions are performed within the external transaction. If an external transaction does not exist, the SQL statement is executed without a transaction. This allows SQL statements that do not require an existing transaction to be performed without one, providing an improvment in performace. If an SQL command requires a transaction and no external transaction exists, an SQL exception is thrown.
 
 
internal
Specifies that transactions are always performed within a JDBC/MX driver-managed transaction. If an external transaction exists when internal transaction mode is in effect, the external transaction is suspended and the SQL statement is executed within a JDBC/MX driver-managed transaction. Upon completion of the driver’s internally managed transaction, the existing external transaction is resumed. The Connection autoCommit flag maintains a value of true when in internal transaction mode.
 
 
 
Follow these steps to create a base table that has LOB columns:
At the OSS prompt, invoke the SQL/MX utility MXCI. Type:
MXCI
1.
Type the following command to enable creating tables that have LOB columns:
CONTROL QUERY DEFAULT JDBC_PROCESS ‘TRUE‘
2.
Type the CREATE TABLE statement; for example, you might use the following simple form of the
statement:
CREATE TABLE table1 (c1 INTEGER NOT NULL, c2 CLOB, c3 BLOB, PRIMARY
KEY(c1))
 
 





JDBC Install for OSS

标签:

原文地址:http://www.cnblogs.com/ECNB/p/4611179.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!