Skip to main content

Posts

Showing posts with the label driver

A JDBC Application to Copy Data Across Databases

Requirement It is required to copy data stored in one data source to another data source having the schema structure using JDBC. Whatever data is present in selected tables of origin data source should be copied to destination data source. Challenges Different JDBC drivers require somewhat different URLs and drivers. Even though Java.sql.DriverManager simplifies need to specify correct JDBC driver by looking at the URL, it is still necessary to make sure required driver is in classpath. Furthermore Driver Manager will not be able to load sun’s JdbcOdbcDriver when it is required to access Odbc Data Sources like MS Access DB files, thus it should explicitly be loaded at application startup.  Also there might be situations as it is in MS Access, which requires matching DSN configuration, additional configurations might be necessary.  As to JDBC URLs, since they are not completely standard among different drivers, user needs to know correct construction of required JDB