weblogic oracle jdbc,针对Weblogic的JDBC写法大全

下面的配置适用于Webloic 6.x/7.x/8.x的config.xml文件

Cloudscape configuration

See

http://www-3.ibm.com/software/data/cloudscape/ for further information on Cloudscape, including how to get an evaluation version and how to buy the software.

Name="Cloudscape" Password="PASSWORD"

Properties="user=USER;dbserver=localhost" Targets="MYSERVER"

TestTableName="SQL SELECT 1"

URL="jdbc:cloudscape:DATABASE;create=true"/>

DB2 Configuration

Name="BEA-DB2-XA" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME;batchPerformanceWorkaround=true"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSIBM.SYSTABLES"

URL="jdbc:bea:db2://HOSTNAME:PORT"/>

DB2 Configuration - BEA Non-XA

See above.

Name="BEA-DB2" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME;batchPerformanceWorkaround=true"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSIBM.SYSTABLES"

URL="jdbc:bea:db2://HOSTNAME:PORT"/>

DB2 Configuration - DataDirect XA

See http://www.datadirect.com/ for more information on getting an evaluation copy of this driver or purchasing the software. The associated jar files are db2.jar, base.jar, and util.jar.

Name="DD-DB2-XA" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME;batchPerformanceWorkaround=true"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSIBM.SYSTABLES"

URL="jdbc:datadirect:db2://HOSTNAME:PORT"/>

DB2 Configuration - DataDirect Non-XA

See above.

Name="DD-DB2" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME;batchPerformanceWorkaround=true"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSIBM.SYSTABLES"

URL="jdbc:datadirect:db2://HOSTNAME:PORT"/>

DB2 Configuration - IBM XA

See http://www.ibm.com/software/data/db2/ for further information on DB2, including how to get a free client SDK and how to buy the software.

The software is by default installed in c:/Program Files/ibm on Windows. The jar files are sqllib/java/db2java.zip and sqllib/java/db2jcc.jar. The path to sqllib/bin must be added to the PATH.

The database must be configured on the client side using the DB2 command line processor. For example,

Run IBM DB2 -> Command Line Tools -> Command Line processor

db2 => catalog tcpip node NODENAME remote HOSTNAME server PORT

db2 => catalog database DATABASE as ALIAS at node NODENAME

Name="IBM-DB2-XA" Password="PASSWORD"

Properties="user=USER;databaseName=DATABASE" Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSIBM.SYSTABLES"

URL="jdbc:db2:DATABASE"/>

DB2 Configuration - IBM Non-XA

See above.

Name="IBM-DB2" Password="PASSWORD"

Properties="user=USER;databaseName=DATABASE" Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSIBM.SYSTABLES"

URL="jdbc:db2:DATABASE"/>

Informix Configuration

DriverName="weblogic.jdbcx.informix.InformixDataSource"

Name="BEA-Informix-XA" Password="PASSWORD"

Properties="informixServer=IFXSERVER;user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSTABLES"

URL="jdbc:bea:informix://HOSTNAME:PORT;informixServer=IFXSERVER;databaseName=DATABASE"/>

Informix Configuration - BEA Non-XA

See above.

DriverName="weblogic.jdbc.informix.InformixDriver"

Name="BEA-Informix" Password="PASSWORD"

Properties="informixServer=IFXSERVER;user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSTABLES"

URL="jdbc:bea:informix://HOSTNAME:PORT;informixServer=IFXSERVER;databaseName=DATABASE"/>

Informix Configuration - DataDirect XA

See http://www.datadirect.com/ for more information on getting an evaluation copy of this driver or purchasing the software. The associated jar files are informix.jar, base.jar, and util.jar.

DriverName="com.ddtek.jdbcx.informix.InformixDataSource"

Name="DD-Informix-XA" Password="PASSWORD"

Properties="informixServer=IFXSERVER;user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSTABLES"

URL="jdbc:datadirect:informix://HOSTNAME:PORT;informixServer=IFXSERVER;databaseName=DATABASE"/>

Informix Configuration - DataDirect Non-XA

See above.

DriverName="com.ddtek.jdbc.informix.InformixDriver"

Name="DD-Informix" Password="PASSWORD"

Properties="informixServer=IFXSERVER;user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSTABLES"

URL="jdbc:datadirect:informix://HOSTNAME:PORT;informixServer=IFXSERVER;databaseName=DATABASE"/>

Informix Configuration - IBM XA

See http://www-3.ibm.com/software/data/informix/ for further information on Informix, including how to get a free client SDK and how to buy the software. Also see Installing and Using the IBM Informix JDBC Driver for more information about using this driver with WebLogic Server.

The associated jar files are ifxjdbc.jar and ifxjdbcx.jar.

Name="IBM-Informix-XA" Password="PASSWORD"

Properties="user=USER;url=jdbc:informix-sqli://HOSTNAME:PORT/DATABASE:informixServer=IFXSERVER;portNumber=PORT;databaseName=DATABASE;ifxIFXHOST=HOSTNAME;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSTABLES"

URL="jdbc:informix-sqli://HOSTNAME:PORT/DATABASE:informixServer=IFXSERVER"/>

Informix Configuration - IBM Non-XA

See above.

Name="IBM-Informix" Password="PASSWORD"

Properties="user=USER;url=jdbc:informix-sqli://HOSTNAME:PORT/DATABASE:informixServer=IFXSERVER;portNumber=PORT;databaseName=DATABASE;ifxIFXHOST=HOSTNAME;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSTABLES"

URL="jdbc:informix-sqli://HOSTNAME:PORT/DATABASE:informixServer=IFXSERVER"/>

MS SQL Server Configuration

DriverName="weblogic.jdbcx.sqlserver.SQLServerDataSource"

Name="BEA-SQLServer-XA"

Password="PASSWORD"

Properties="user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:bea:sqlserver://HOSTNAME:PORT"/>

MS SQL Server Configuration - BEA Non-XA

See above.

DriverName="weblogic.jdbc.sqlserver.SQLServerDriver"

Name="BEA-SQLServer" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:bea:sqlserver://HOSTNAME:PORT"/>

MS SQL Server Configuration - DataDirect XA

See http://www.datadirect.com/ for more information on getting an evaluation copy of this driver or purchasing the software. The associated jar files are sqlserver.jar, base.jar, and util.jar. Additionally, the files instjdbc.sql and sqljdbc.dll need to be installed on the server side; see the documentation.

DriverName="com.ddtek.jdbcx.sqlserver.SQLServerDataSource"

Name="DD-SQLServer-XA" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:datadirect:sqlserver://HOSTNAME:PORT"/>

MS SQL Server Configuration - DataDirect Non-XA

See above.

DriverName="com.ddtek.jdbc.sqlserver.SQLServerDriver"

Name="DD-SQLServer" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:datadirect:sqlserver://HOSTNAME:PORT"/>

MS SQL Server Configuration - Weblogic Non-XA

This driver shipped with WebLogic Server 6.X, 7.X, and 8.X (it is currently marked as deprecated and has a status of "End of Life"; it will not be shipped with the next major release). No additional configuration is needed for this driver (no CLASSPATH or PATH changes). This driver has JDBC 1.0 support only.

For more details about this driver, see The WebLogic jDriver for SQL Server.

Name="WEBLOGIC-SQLServer"

Password="PASSWORD"

Properties="user=USER;db=DATABASE;server=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:weblogic:mssqlserver4"/>

MySQL Configuration

This open-source database is available from

http://www.mysql.com/. Note that you need to download and install both the database, and the JDBC driver, Connector/J. The jar for the driver must be included in the CLASSPATH.

Also note that the console uses the old class name for the driver (see the output below). There is a new class name but the old name still exists and we figured it would cover configurations using the old and new classes. According to one newsgroup article, the MySQL jar must come before the PointBase jar or things don't work correctly.

Name="MySQL" Password="PASSWORD"

Properties="user=USER TestTableName="SQL SELECT 1"

URL="jdbc:mysql://localhost:PORT/test"/>

Oracle Configuration

DriverName="weblogic.jdbcx.oracle.OracleDataSource"

Name="BEA-Oracle-XA" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;SID=oraPORT;serverName=HOSTNAME"

Targets="MYSERVER" TestTableName="SQL SELECT 1 FROM DUAL"

URL="jdbc:bea:oracle://HOSTNAME:PORT"/>

Oracle Configuration - BEA Non-XA

See above.

Name="BEA-Oracle" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;SID=oraPORT;serverName=HOSTNAME"

Targets="MYSERVER" TestTableName="SQL SELECT 1 FROM DUAL"

URL="jdbc:bea:oracle://HOSTNAME:PORT"/>

Oracle Configuration - Oracle Thin XA

This driver is shipped with WebLogic Server 6.X, 7.X, and 8.X. The associated jar file is installed in WLHOME/server/lib: ojdbc14.jar for JDK 1.4 and later (classes12.zip for earlier JDK's); this jar is included in the classpath in the manifest in weblogic.jar so normally they need not be included in the user's CLASSPATH.

For more information about using this driver with WebLogic Server, see the following documents:

Using the Oracle Thin Driver

Using Oracle Thin/XA Driver

DriverName="oracle.jdbc.xa.client.OracleXADataSource"

Name="Oracle-Thin-XA" Password="PASSWORD"

Properties="user=USER TestTableName="SQL SELECT 1 FROM DUAL"

URL="jdbc:oracle:thin:@HOSTNAME:PORT:oraPORT"/>

Oracle Configuration - Oracle Thin Non-XA

See above.

Name="Oracle-Thin" Password="PASSWORD"

Properties="user=USER TestTableName="SQL SELECT 1 FROM DUAL"

URL="jdbc:oracle:thin:@HOSTNAME:PORT:oraPORT"/>

Oracle Configuration - BEA Type 2 XA

This Type 2 driver (based on OCI) is shipped with WebLogic Server 6.X, 7.X, and 8.X (it may no longer ship with the next major release). It has limited JDBC 2.0/3.0 support. To use this driver, ORACLE_HOME must be set and the associated client software must be installed. The driver used depends on the version of Oracle being used - 8.1.7, 9.0.1, and 9.2.0 are currently supported. For the 9.2.0 version, add WLHOME/server/bin/ociPORT_8 to the PATH (similarly for the other versions).

Additionally, the client must be configured to recognize the database using one of the Oracle utilities, or by modifying ORACLE_HOME/network/ADMIN/tnsnames.ora. Here is a sample entry for a database on HOSTNAME, port PORT, database name oraPORT.

oraPORT =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = HOSTNAME)(PORT = PORT))

)

(CONNECT_DATA =

(SERVICE_NAME = oraPORT)

)

)

For more information about this driver, see WebLogic jDriver for Oracle.

Name="BEA-Oracle-Type2-XA" Password="PASSWORD"

Properties="user=USER;server=oraPORT" Targets="MYSERVER"

TestTableName="SQL SELECT 1 FROM DUAL"

URL="jdbc:weblogic:oracle"/>

Oracle Configuration - BEA Type 2 Non-XA

See above.

Name="BEA-Oracle-Type2" Password="PASSWORD"

Properties="user=USER;server=oraPORT" Targets="MYSERVER"

TestTableName="SQL SELECT 1 FROM DUAL"

URL="jdbc:weblogic:oracle"/>

Oracle Configuration - DataDirect XA

See http://www.datadirect.com/ for more information on getting an evaluation copy of this driver or purchasing the software. The associated jar files are oracle.jar, base.jar, and util.jar.

DriverName="com.ddtek.jdbcx.oracle.OracleDataSource"

Name="DD-Oracle-XA" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;SID=oraPORT;serverName=HOSTNAME"

Targets="MYSERVER" TestTableName="SQL SELECT 1 FROM DUAL"

URL="jdbc:datadirect:oracle://HOSTNAME:PORT"/>

Oracle Configuration - DataDirect Non-XA

See above.

Name="DD-Oracle" Password="PASSWORD"

Properties="user=USER;portNumber=PORT;SID=oraPORT;serverName=HOSTNAME"

Targets="MYSERVER" TestTableName="SQL SELECT 1 FROM DUAL"

URL="jdbc:datadirect:oracle://HOSTNAME:PORT"/>

Oracle Configuration - Oracle OCI XA

This type 2 driver is installed with the client-side Oracle software. ORACLE_HOME must be set in the environment. The client side jar must be in the CLASSPATH: ojdbc14.jar for JDK 1.4 and later (classes12.zip for earlier JDK's). The directory ORACLE_HOME/bin must be included in the PATH. See information above for "Oracle Configuration - BEA Type 2 XA" regarding client-side configuration.

DriverName="oracle.jdbc.xa.client.OracleXADataSource"

Name="ORACLE-OCI-XA" Password="PASSWORD"

Properties="user=USER TestTableName="SQL SELECT 1 FROM DUAL"

URL="jdbc:oracle:oci:@oraPORT"/>

Oracle Configuration - Oracle OCI Non-XA

See above.

Name="ORACLE-OCI" Password="PASSWORD"

Properties="user=USER TestTableName="SQL SELECT 1 FROM DUAL"

URL="jdbc:oracle:oci:@oraPORT"/>

PointBase Configuration

See

http://www.pointbase.com/ for further information on PointBase, including how to get an evaluation version and how to buy the software.

Name="PointBase-XA" Password="PASSWORD"

Properties="user=USER;databaseName=jdbc:pointbase:server://localhost:PORT/demo"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSTABLES"

URL="jdbc:pointbase:server://localhost:PORT/demo"/>

PointBase Configuration - PointBase Non-XA

See above.

DriverName="com.pointbase.jdbc.jdbcUniversalDriver"

Name="PointBase" Password="PASSWORD"

Properties="user=USER;databaseName=jdbc:pointbase:server://localhost:PORT/demo"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM SYSTABLES"

URL="jdbc:pointbase:server://localhost:PORT/demo"/>

Sybase Configuration

DriverName="weblogic.jdbcx.sybase.SybaseDataSource"

Name="BEA-Sybase-XA" Password="PASSWORD"

Properties="user=USER;url=jdbc:bea:sybase://HOSTNAME:PORT;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:bea:sybase://HOSTNAME:PORT"/>

Sybase Configuration - BEA Non-XA

See above.

Name="BEA-Sybase" Password="PASSWORD"

Properties="user=USER;url=jdbc:bea:sybase://HOSTNAME:PORT;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:bea:sybase://HOSTNAME:PORT"/>

Sybase Configuration - DataDirect XA

See http://www.datadirect.com/ for more information on getting an evaluation copy of this driver or purchasing the software. The associated jar files are sybase.jar, base.jar, and util.jar.

DriverName="com.ddtek.jdbcx.sybase.SybaseDataSource"

Name="DD-Sybase-XA" Password="PASSWORD"

Properties="user=USER;url=jdbc:datadirect:sybase://HOSTNAME:PORT;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:datadirect:sybase://HOSTNAME:PORT"/>

Sybase Configuration - DataDirect Non-XA

See above.

Name="DD-Sybase" Password="PASSWORD"

Properties="user=USER;url=jdbc:datadirect:sybase://HOSTNAME:PORT;portNumber=PORT;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:datadirect:sybase://HOSTNAME:PORT"/>

Sybase Configuration - Sybase XA

This driver is shipped with WebLogic Server 6.X, 7.X, and 8.X. The associated jar files are installed in WLHOME/server/lib: jConnect.jar and jconn2.jar; they are included in the classpath in the manifest in weblogic.jar so normally they need not be included in the user's CLASSPATH.

DriverName="com.sybase.jdbc2.jdbc.SybXADataSource"

Name="Sybase-XA" Password="PASSWORD"

Properties="user=USER;url=jdbc:sybase:Tds:HOSTNAME:PORT/DATABASE;networkProtocol=Tds;portNumber=PORT;userName=HOSTNAME;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:sybase:Tds:HOSTNAME:PORT/DATABASE"/>

Sybase Configuration - Sybase Non-XA (Jconnect 4.x)

See above.

Name="Sybase-old" Password="PASSWORD"

Properties="user=USER;url=jdbc:sybase:Tds:HOSTNAME:PORT/DATABASE;networkProtocol=Tds;portNumber=PORT;userName=HOSTNAME;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:sybase:Tds:HOSTNAME:PORT/DATABASE"/>

Sybase Configuration - Sybase Non-XA

See above.

Name="Sybase" Password="PASSWORD"

Properties="user=USER;url=jdbc:sybase:Tds:HOSTNAME:PORT/DATABASE;networkProtocol=Tds;portNumber=PORT;userName=HOSTNAME;databaseName=DATABASE;serverName=HOSTNAME"

Targets="MYSERVER"

TestTableName="SQL SELECT COUNT(*) FROM sysobjects"

URL="jdbc:sybase:Tds:HOSTNAME:PORT/DATABASE"/>

posted on 2007-03-01 08:05 david.turing 阅读(6507) 评论(0)  编辑  收藏

参与评论 您还未登录,请先 登录 后发表或查看评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:游动-白 设计师:我叫白小胖 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值