Description

This lesson describes how to define your source and destination JDBC Property files.


Overview

The GenRocket database migration command line tool (DMCLT) connects to the source and destination databases via JDBC. Therefore, two JDBC property files must be defined in order for the DMCLT so connect to a source and a destination database. Note, that only one JDBC property file is needed if the migration is taking place in the same database.


Required JDBC properties 

The DMCLT requires that each JDBC properties files contain the following four properties:

  • driver - the name of the database vendor JDBC driver
    • Note: the actual driver file must be placed in the GENROCKET_HOME/lib folder
  • user - the name used to log in to the database
  • password - the password used to log in to the database¬†
  • url - the universal resource locator to connect to the database


Example Source & Destination JDBC Property Files

The example JDBC Property files define the connection to two MySQL databases which are following:

  • Source database name is, alpha
  • Destination database name is, beta


Source JDBC Property File


driver=com.mysql.jdbc.Driver
user=root
password=alpha123
url=jdbc:mysql://localhost:3306/alpha?rewriteBatchedStatements=true
batchCount=1000


Destination JDBC Property File


driver=com.mysql.jdbc.Driver
user=root
password=beta123
url=jdbc:mysql://localhost:3306/beta?rewriteBatchedStatements=true
batchCount=1000




Move onto the next lesson >