在Apusic上配置达梦等数据源

原文出自:http://operamasks.blogbus.com/logs/19649949.html

近期因支持项目,测试了跟达梦、人大金仓、gbase等数据库的兼容性,摘录在Apusic上配置访问不同数据库的TYPE4数据源样例如下:

1. 达梦

<datasource name="test"
     jndi-name="jdbc/test"
     driver-class="dm.jdbc.driver.DmDriver"
     url="jdbc:dm://localhost:12345/test"
  >
    <property name="user" value="scott"/>   
    <property name="password" value="tiger"/>
  </datasource>

2. kingbase

<datasource name="test"
     jndi-name="jdbc/test"
     driver-class="com.kingbase.Driver"
     url="jdbc:kingbase://127.0.0.1:54321/TEST"
  >
    <property name="user" value="scott"/>   
    <property name="password" value="tiger"/>
  </datasource>

3. gbase

<datasource name="test"
     jndi-name="jdbc/test"
     driver-class="com.gbase.jdbc.Driver"
     url="jdbc:GBase://localhost:5258/test"
  >
    <property name="user" value="scott"/>   
    <property name="password" value="tiger"/>
  </datasource>
4. sybase

<datasource name="test"
     jndi-name="jdbc/test"
     driver-class="com.sybase.jdbc2.jdbc.SybDrive"
     url="jdbc:sybase:Tds:localhost:2638?ServiceName=test"
  >
    <property name="user" value="scott"/>   
    <property name="password" value="tiger"/>
  </datasource>


5. db2

<datasource name="test"
     jndi-name="jdbc/test"
     driver-class="COM.ibm.db2.jdbc.net.DB2Driver"
     url="jdbc:db2://localhost:50000/test"
  >
    <property name="user" value="scott"/>   
    <property name="password" value="tiger"/>
  </datasource>

6. SQL Server

<datasource name="test"
     jndi-name="jdbc/test"
     driver-class="com.microsoft.jdbc.sqlserver.SQLServerDriver"
     url="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=test"
  >
    <property name="user" value="scott"/>   
    <property name="password" value="tiger"/>
  </datasource>

7. Oracle

<datasource name="test"
     jndi-name="jdbc/test"
     driver-class="oracle.jdbc.OracleDriver"
     url="jdbc:oracle:thin:@localhost:1521:orcl"
  >
    <property name="user" value="scott"/>   
    <property name="password" value="tiger"/>
  </datasource>

你可能感兴趣的:(oracle,sql,SQL Server,db2,Sybase)