Newer Version Available
Configure Database Access
The top-level database configuration object is the DatabaseConfig bean, which has these properties.
- sqlConfig—The SQL configuration bean for the data access object that interacts with a database.
- dataSource—The bean that acts as database driver and authenticator. It must refer to an implementation of javax.sql.DataSource such as org.apache.commons.dbcp.BasicDataSource.
This code is an example of a DatabaseConfig bean:
The DataSource bean sets the physical information needed for database connections. It contains the following properties:
- driverClassName—The fully qualified name of the implementation of a JDBC driver.
- password—The password for logging in to the database.
- url—The string for physically connecting to the database.
- username—The username for logging in to the database.
Depending on your implementation, additional information is required. For example, use org.apache.commons.dbcp.BasicDataSource when database connections are pooled.
Versions of Data Loader from API version 25.0 onwards do not come with an Oracle JDBC driver. Using Data Loader to connect to an Oracle data source without a JDBC driver installed results in a “Cannot load JDBC driver class” error. To add the Oracle JDBC driver to Data Loader:
- Download the latest JDBC driver from http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html.
- Copy the JDBC .jar file to data loader install folder/java/bin.