Migrating Cloudscape database to Derby
You can migrate Cloudscape database to Derby using the instructions provided here.
IBM® Security Verify Directory Integrator Version 10.0.0 uses Apache Derby Version 10.8 as its bundled database, used by default by the System Store. You will need to migrate your existing Cloudscape or Derby databases (created using previous versions of IBM® Security Verify Directory Integrator) to be able to use IBM® Security Verify Directory Integrator Version 10.0.0. Apache Derby Version 10.8 drivers that are shipped with IBM® Security Verify Directory Integrator Version 10.0.0 cannot be used to communicate with older versions of Cloudscape.
Notable differences that have an immediate impact are as follows:
-
The
long varbinary
data type is no longer supported. Instead, BLOB datatype has been introduced (making Derby compatible with DB2®). For this reason, all SQL Statements that made use of long varbinary datatype must now be modified to use BLOB. -
JDBC Java™ package names have changed from com.ibm.db2j.* in previous releases to org.apache.derby.* in Derby Version 10.
-
The JDBC URL for Derby (embedded/network mode access) Version 10 is different from Cloudscape 5.1. Hence the JDBC properties mentioned in *global.properties / solution.properties have also been modified for the current version of IBM® Security Verify Directory Integrator. * | Connection type | Cloudscape Version 5.1 | Derby Version 10 |
| Embedded Derby / Cloudscape | jdbc:db2j: | jdbc:derby: | | DB2 JDBC Universal Database Driver (Network mode) | jdbc:db2j:net | jdbc:derby:net (Not recommended to use) | | DerbyClient Driver | - | jdbc:derby (Recommended) |
Table 1. JDBC URL differences
The Derby team has provided a migration utility that migrates a Cloudscape 5.1 database to a new Derby Version 10 database. It migrates all the tables and their corresponding data into a newly generated Derby Version 10 database. It modifies all tables with varbinary datatype to BLOB datatype, hence making the migration process quite painless.
This utility is bundled with IBM® Security Verify Directory Integrator, in the TDI_install_dir/tools/CSMigration folder, along with a wrapper script that invokes the migration tool, called migrateCS.bat(sh). To migrate a Cloudscape 5.1 System Store Database created using IBM® Security Verify Directory Integrator Version 6.0 to Derby Version 10, you have to invoke the migrate script in the following manner:
migrateCS [Path_of_CloudscapeV51_Database] [Path_of_new_DerbyV10_Database]
Note: This migration utility can be used for migrating only from Cloudscape 5.1 to Derby Version 10. Hence, the TDI_install_dir/tools/CSMigration/migratCS.bat(sh) file can be used for migrating system store database from IBM® Security Verify Directory Integrator Version 6.0 to Versions 6.1.1 and later. However, for migrating system store database from IBM® Security Verify Directory Integrator Version 6.1.1 to later versions, you must simply copy the old TDISysStore from the Version 6.1.1 installation directory to the new installation of the new version.
You may need to give some thought to the location of the new Derby database. In IBM® Security Verify Directory Integrator v6.0 and v6.1.x, the System Store database often was located in the installation directory of IBM® Security Verify Directory Integrator; this is an unfortunate location for many reasons. For IBM® Security Verify Directory Integrator Version 10.0.0 we strongly recommend you use a Solution Directory, away from the installation directory.
Besides migration of data, you also need to modify your
global.properties /
solution.properties files (using the migration tool or manually) to incorporate the new JDBC URL parameters.