No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Configuring Database Access
| Available in: Enterprise, Performance, Unlimited, Developer, and Database.com Editions |
When you run Data Loader in batch mode from the command line, use \samples\conf\database-conf.xml to configure database access objects, which you use to extract data directly from a database.
DatabaseConfig Bean
The top-level database configuration object is the DatabaseConfig bean, which has the following 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.
The following code is an example of a DatabaseConfig bean:
DataSource
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.
- url
- The string for physically connecting to the database.
- username
- The username for logging in to the database.
- password
- The password for logging in to the database.
Depending on your implementation, additional information may be required. For example, use org.apache.commons.dbcp.BasicDataSource when database connections are pooled.
The following code is
an example of a DataSource bean:
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 will result
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.