Migrating DB2 content side by side
Transfer DB2 data from your HCL Connections™ 5.0 or 5.5 databases to the new 5.0 or 5.5 databases as part of migrating to version 6.0.
About this task
- 50
- 50CRx
- 55
- 55CRx
To update the databases, complete the following steps:
Procedure
-
Using the Connections 5.0 or 5.5
database wizard, create target 5.0 or 5.5 databases on a separate system from your source databases.
The new databases host your data for migration to the 6.0 deployment.
The procedure is described in the IBM Knowledge Center: Creating databases with the database wizard.
Note: If the 5.0 or 5.5 database wizard is not on the system that hosts the target databases, copy it from the system that hosts Connections. - On Windows™ 2008
and 2012, you must perform DB2® administration
tasks with full administrator privileges.
- Logged in as the instance owner, open a command line and change to the DB2® bin directory. For example: C:\Program Files\IBM\SQLLIB\BIN.
- Enter the following command: db2cwadmin.bat. This command opens the DB2® command line processor while also setting your DB2® privileges.
- Bring the target databases up to the latest Cumulative Refresh (CR) level for the code stream as described in Updating 5.0 and 5.5 DB2 databases manually.
-
Prepare the target databases to accept data from the source databases. Remove constraints from
the target databases by running the following SQL scripts from the IBM® Connections 6.0 package:
Notes:
- Run these SQL scripts before you transfer data to the target database.
- IBM® Connections uses the following database libraries,
which are already on the target database server:
- db2jcc4.jar
- db2jcc_license_cu.jar
Repeat the following procedures for each application that you are migrating:- Log in as the instance owner. The default owner on AIX® and Linux™ is db2inst1. On Windows™, the default is db2admin.
- For each application, change to the directory where the relevant SQL file is stored.
- Enter the appropriate commands for each application, as shown in the following table:Note: Run the predbxferxx.sql commands that are in the 6.0 GA build and not the 5.0 or 5.5 build, wherexx might be:
- 50
- 50CRx
- 55
- 55CRx
If you cannot find the required predbxx.sql in the location outline, you can take the predbxx.sql files from the Upgrade-Wizard output.
Table 1. DB2® commands for removing constraints Application and Directory DB2® commands Activities: /connections.sql/activities/db2 If you are at: - 5.0 or a 5.0 CR run db2 -tvf predbxfer50.sql
- 5.5 or a 5.5 CR run db2 -tvf predbxfer55.sql
Blogs: /connections.sql/blogs/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf predbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf predbxfer55.sql
Bookmarks: /connections.sql/dogear/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf predbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf predbxfer55.sql
Communities: /connections.sql/communities/db2 If you are at: - 5.0 or 5.0 CR1 run db2 -td@ -vf predbxfer50.sql
- 5.0 CR2 or later CR run db2 -td@ -vf predbxfer50CR2.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf predbxfer55.sql
Communities-calendar: /connections.sql/communities/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf calendar-predbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf calendar-predbxfer55.sql
Files: /connections.sql/files/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf predbxfer50.sql
- 5.5 or 5.5 CR1 run db2 -td@ -vf predbxfer55.sql
- 5.5 CR2 or later run db2 -td@ -vf predbxfer55CR2.sql
Forums: /connections.sql/forum/db2 If you are at: - 5.0 run db2 -tvf predbxfer50.sql
- 5.0 CR1 or later run db2 -tvf predbxfer50CR1.sql
- 5.5 or a 5.5 CR run db2 -tvf predbxfer55.sql
Home page: /connections.sql/homepage/db2 If you are at: - 5.0 run db2 -td@ -vf predbxfer50.sql
- 5.0 CR1 run db2 -td@ -vf predbxfer50CR1.sql
- 5.0 CR2 run db2 -td@ -vf predbxfer50CR2.sql
- 5.0 CR3 run db2 -td@ -vf predbxfer50CR3.sql
- 5.0 CR4 run db2 -td@ -vf predbxfer50CR4.sql
- 5.5 run db2 -td@ -vf predbxfer55.sql
- 5.5 CR1 run db2 -td@ -vf predbxfer55CR1.sql
- 5.5 CR2 run db2 -td@ -vf predbxfer55CR2.sql
Metrics: /connections.sql/metrics/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf predbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf predbxfer55.sql
Mobile: /connections.sql/mobile/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf predbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf predbxfer55.sql
Profiles: /connections.sql/profiles/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf predbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf predbxfer55.sql
Wikis: /connections.sql/wikis/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf predbxfer50.sql
- 5.5 or 5.5 CR1 run db2 -td@ -vf predbxfer55.sql
- 5.5 CR2 run db2 -td@ -vf predbxfer55CR2.sql
Push notification: /connections.sql/pushnotification/db2 If you are at 5.5 or a 5.5 CR, run db2 -td@ -vf predbxfer55.sql Note: Check that constraints were removed by checking the output from the predbxfer scripts. If the scripts run successfully, the constraints are dropped. - Using the IBM® Connections
database transfer tool, transfer data to the target databases:
- Reapply constraints to the target databases:
- Log in as the instance owner.
- For each application, change to the directory where the relevant SQL file is stored.
- Note: Run the postdbxferxx.sql commands that are in the 6.0 GA build and not the 5.0 or 5.5 build where xx might be:
- 50
- 50CRx
- 55
- 55CRx
- Enter the appropriate commands for each application, as shown in the following table:
Table 2. DB2® commands for reapplying constraints Application and Directory DB2® commands Activities: /connections.sql/activities/db2 If you are at: - 5.0 or a 5.0 CR run db2 -tvf postdbxfer50.sql
- 5.5 or a 5.5 CR run db2 -tvf postdbxfer55.sql
- Run db2 -tvf clearScheduler.sql
Blogs: /connections.sql/blogs/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf postdbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf postdbxfer55.sql
Bookmarks: /connections.sql/dogear/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf postdbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf postdbxfer55.sql
Communities: /connections.sql/communities/db2 If you are at: - 5.0 or 5.0 CR1 run db2 -td@ -vf postdbxfer50.sql
- 5.0 CR2 or a later CR run db2 -td@ -vf postdbxfer50CR2.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf postdbxfer55.sql
- Run db2 -td@ -vf clearScheduler.sql
Communities - calendar: /connections.sql/communities/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf calendar-postdbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf calendar-postdbxfer55.sql
Files: /connections.sql/files/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf postdbxfer50.sql
- 5.5 or 5.5 CR1 run db2 -td@ -vf postdbxfer55.sql
- 5.5 CR2 or later run db2 -td@ -vf postdbxfer55CR2.sql
- Run db2 -td@ -vf clearScheduler.sql
Forums: /connections.sql/forum/db2 If you are at: - 5.0 run db2 -tvf postdbxfer50.sql
- 5.0 CR1 or later run db2 -tvf postdbxfer50CR1.sql
- 5.5 or a 5.5 CR run db2 -tvf postdbxfer55.sql
- Run db2 -tvf clearScheduler.sql
Homepage: /connections.sql/homepage/db2 If you are at: - 5.0 run db2 -td@ -vf predbxfer50.sql
- 5.0 CR1 run db2 -td@ -vf postdbxfer50CR1.sql
- 5.0 CR2 run db2 -td@ -vf postdbxfer50CR2.sql
- 5.0 CR3 run db2 -td@ -vf postdbxfer50CR3.sql
- 5.0 CR4 run db2 -td@ -vf postdbxfer50CR4.sql
- 5.5 run db2 -td@ -vf postdbxfer55.sql
- 5.5 CR1 run db2 -td@ -vf postdbxfer55CR1.sql
- 5.5 CR2 run db2 -td@ -vf postdbxfer55CR2.sql
- Run db2 -td@ -vf clearScheduler.sql
Metrics: /connections.sql/metrics/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf postdbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf postdbxfer55.sql
- Run db2 -td@ -vf clearScheduler.sql
Mobile: /connections.sql/mobile/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf postdbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf postdbxfer55.sql
Profiles: /connections.sql/profiles/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf postdbxfer50.sql
- 5.5 or a 5.5 CR run db2 -td@ -vf postdbxfer55.sql
- Run db2 -td@ -vf clearScheduler.sql
Wikis: /connections.sql/wikis/db2 If you are at: - 5.0 or a 5.0 CR run db2 -td@ -vf postdbxfer50.sql
- 5.5 or 5.5 CR1 run db2 -td@ -vf postdbxfer55.sql
- 5.5 CR2 run db2 -td@ -vf postdbxfer55CR2.sql
- Run db2 -td@ -vf clearScheduler.sql
Push notification: /connections.sql/pushnotification/db2 If you are at: - 5.5 or a 5.5 CR, run db2 -td@ -vf postdbxfer55.sql
- Run db2 -td@ -vf clearScheduler.sql
-
(Profiles only.) Run the following commands to update the database
sequence for DB2® target databases:
Run the following commands on the source database:
SELECT NEXT VALUE FOR EMPINST.CHG_EMP_DRAFT_SEQ AS CHG_EMP_DRAFT_SEQ FROM SYSIBM.SYSDUMMY1;
SELECT NEXT VALUE FOR EMPINST.EMP_DRAFT_SEQ AS EMP_DRAFT_SEQ FROM SYSIBM.SYSDUMMY1;
SELECT NEXT VALUE FOR EMPINST.EXT_DRAFT_SEQ AS EXT_DRAFT_SEQ FROM SYSIBM.SYSDUMMY1;
Note: The results of these queries are the query_result that you use on the target databases in the next step.Run the following commands on the target database:
ALTER SEQUENCE EMPINST.CHG_EMP_DRAFT_SEQ RESTART WITH query_result;
ALTER SEQUENCE EMPINST.EMP_DRAFT_SEQ RESTART WITH query_result;
ALTER SEQUENCE EMPINST.EXT_DRAFT_SEQ RESTART WITH query_result;
Note: Where query_result is the corresponding result from the previous select statements.
- (Metrics only.) Run the following commands to update the
database sequence for DB2® target
databases:
Run the following command on the source database:
SELECT NEXT VALUE FOR METRICS.ID_VALUES AS ID_VALUES_SEQ FROM SYSIBM.SYSDUMMY1;
SELECT MAX(ID) FROM METRICS.F_TRX_EVENTS;
Note: The results of these queries are the query_result that you use on the target databases in the next step.Run the following commands on the target database:
ALTER SEQUENCE METRICS.ID_VALUES RESTART WITH query_result;
ALTER TABLE METRICS.F_TRX_EVENTS ALTER COLUMN ID RESTART WITH query_result;
Note: Where query_result is the corresponding result from the previous select statements.
- Manually, or using the DB Wizard, update the new databases to bring them to the IBM® Connections version 6.0 level. For more information, see Migrating 5.0 and 5.5 databases to 6.0 and Updating 5.0 and 5.5 databases with the wizard.
Results
Check that all the databases are working correctly. If you find errors, resolve the problem and repeat this task.