MyEclipse中对oracle、sql、mysql、db2的连接配置
程序员文章站
2022-05-08 20:30:20
...
1、oracle
driver=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@localhost:1521:XE
username=sa
password=sa
方言:
hibernate.dialect=org.hibernate.dialect.OracleDialect
所需jar包:
ojdbc14.jar
官方下载:
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc101040-094982.html
2、sql server
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
url=jdbc:sqlserver://127.0.0.1:1433;databaseName=TestDB
username=sa
password=sa
方言:
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
所需jar包:
sqljdbc.jar
sqljdbc4.jar
官方下载:
http://www.microsoft.com/downloads/details.aspx?FamilyID=a737000d-68d0-4531-b65d-da0f2a735707&displayLang=zh-cn
3、mysql
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8
username=sa
password=sa
方言:
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
所需jar包:
mysql-connector-java-5.0.5-bin.jar
官方下载:
http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.15.zip/from/http://mysql.ntu.edu.tw/
4、db2
driver=com.ibm.db2.jcc.DB2Driver
url=jdbc:db2://127.0.0.1:50002/DBName:currentSchema=dbName;
username=sa
password=sa
方言:
hibernate.dialect=org.hibernate.dialect.DB2Dialect
需要jar包:
db2jcc.jar
db2jcc_license_cu.jar
driver=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@localhost:1521:XE
username=sa
password=sa
方言:
hibernate.dialect=org.hibernate.dialect.OracleDialect
所需jar包:
ojdbc14.jar
官方下载:
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc101040-094982.html
2、sql server
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
url=jdbc:sqlserver://127.0.0.1:1433;databaseName=TestDB
username=sa
password=sa
方言:
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
所需jar包:
sqljdbc.jar
sqljdbc4.jar
官方下载:
http://www.microsoft.com/downloads/details.aspx?FamilyID=a737000d-68d0-4531-b65d-da0f2a735707&displayLang=zh-cn
3、mysql
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8
username=sa
password=sa
方言:
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
所需jar包:
mysql-connector-java-5.0.5-bin.jar
官方下载:
http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.15.zip/from/http://mysql.ntu.edu.tw/
4、db2
driver=com.ibm.db2.jcc.DB2Driver
url=jdbc:db2://127.0.0.1:50002/DBName:currentSchema=dbName;
username=sa
password=sa
方言:
hibernate.dialect=org.hibernate.dialect.DB2Dialect
需要jar包:
db2jcc.jar
db2jcc_license_cu.jar
上一篇: 流鼻血是什么原因 流鼻血怎么办
下一篇: 上班族必须知道的有效护眼窍门