• JDBC Install for OSS


    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))
     
     





  • 相关阅读:
    sysaux 过大如何清理释放空间
    oracle获取当前时间前半小时和整点的时间
    在Mac OS 下 npm install 报权限不足的错误
    基于 NPOI + 反射的Excel导入帮助类
    从零开始 MongoDB 集群(ReplSet)搭建 之一 MongoDB的安装
    使用Swagger导入cvs文件出现乱码的解决办法
    基于DynamicExpresso的自定义表达式计算
    从零开始 MongoDB 集群(ReplSet)搭建 之二 群集搭建
    halcon视觉入门钢珠识别
    纯前端如何在网页端播放摄像头的实时画面
  • 原文地址:https://www.cnblogs.com/ECNB/p/4611179.html
Copyright © 2020-2023  润新知