Drivers and JDBC URLs for commonly used databases:
Oracle Database:
Driver Package Name: Ojdbc14.jar
Name of the driver class: Oracle.jdbc.driver.OracleDriver
JDBC url:jdbc:oracle:thin:@ Dbip:port:databasename
Description: Driver package name may be changed
The black font part of the JDBC URL must be preserved intact for the URL format that the driver recognizes. The red font part needs to be filled in according to the database installation. The meaning of each part is as follows:
dbip– is the IP address of the database server, if it is locally writable: localhost or 127.0.0.1.
port– is the listener port for the database, which needs to be configured at installation time by default of 1521.
databasename– is the SID of the database, typically the name of the global database.
For example, if you want to access the local database allandb, Port 1521, then the URL is written as follows:
Jdbc:oracle:thin: @localhost: 1521:allandb download address is as follows:
Http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
SQL Server Database
Driver package Name: Msbase.jar Mssqlserver.jar Msutil.jar
Name of the driver class: Com.microsoft.jdbc.sqlserver.SQLServerDriver
JDBC url:jdbc:microsoft:sqlserver://Dbip:port;databasename=databasename
Description: Driver package name may be changed
The black font part of the JDBC URL must be preserved intact for the URL format that the driver recognizes. The Red font section needs to be filled in according to the database installation. The meaning of each part is as follows:
dbip– is the IP address of the database server, if it is locally writable: localhost or 127.0.0.1.
port– is the listener port for the database, which needs to be configured at installation time by default of 1433.
databasename– the name of the database.
For example, if you want to access the local database allandb, port 1433, then the URL is written as follows:
Jdbc:microsoft:sqlserver: @localhost: 1433; DatabaseName =allandb
Download Address: http://www.microsoft.com/downloads/details.aspx
MySQL Database
Driver Package Name: Mysql-connector-java-3.1.11-bin.jar
Name of the driver class: Com.mysql.jdbc.Driver
JDBC url:jdbc:mysql://Dbip:port/databasename
Description: Driver package name may be changed
The black font part of the JDBC URL must be preserved intact for the URL format that the driver recognizes. The Red font section needs to be filled in according to the database installation. The meaning of each part is as follows:
dbip– is the IP address of the database server, if it is locally writable: localhost or 127.0.0.1.
port– is the listener port for the database, which needs to be configured at installation time by default of 3306.
databasename– the name of the database.
For example, if you want to access the local database allandb, port 1433, then the URL is written as follows:
Jdbc:mysql://localhost:3306/allandb
Download Address: http://dev.mysql.com/downloads/connector/j/
Access Database
Driver package Name: The driver is included in the Javase and does not require additional installation.
Name of the driver class: Sun.jdbc.odbc.JdbcOdbcDriver
JDBC URL:jdbc:odbc:datasourcename
Description: This driver can only work in Windows system, first need to establish an Access database in the operating system of the local Data source (ODBC), if the name is Allandb, then the URL is written as follows:
Jdbc:odbc:allandb