欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

几种常见数据库的driverClassName和url

程序员文章站 2022-06-10 12:00:37
...

 

DB2:

 

driverClassName:com.ibm.db2.jcc.DB2Driver

 

url:jdbc:db2://localhost:50000/sample

 

Oracle:

 

driverClassName:oracle.jdbc.driver.OracleDriver

 

url:jdbc:oracle:thin:@localhost:1521:orcl

 

MySql:

 

driverClassName:com.mysql.jdbc.Driver

 

url:jdbc:mysql://localhost:3306/test

 

SqlServer:

 

driverClassName:com.microsoft.sqlserver.jdbc.SQLServerDriver

 

url:jdbc:sqlserver://localhost:1433;databaseName=test