DB2 backup/restore for IC5.5 – diff. diff. diff. diff.

A different instance owner, a different instance name, different db2levels and different paths. This is a setup you could bump into when you want to migrate your DB2 databases for your IBM Connections 4.5 or 5.0 environment to version five dot five.

When going with the side-by-side migration path you can use the DBT tool as provided by IBM but you can also accomplish this by using DB2 backup restore mechanism as long as your operating system remains the same.

Backup and restore operations between different operating systems and hardware platforms

This is one of the setups I had to work with.

Source DB2 system
– Windows 2008 R2 64bit
– DB2 10.1 FP2 64-bit
– Tablespaces located on D:
– Instance owner: DB2ADMIN
– Instance name: DB2

Target DB2 system
– Windows 2012 64-bit
– DB2 10.5 FP7 64-bit
– Tablespaces located on Z:
– Instance owner: DB2IIC
– Instance name: DB2IIC

First create offline backups on the source DB2 system. ( You can’t use online backups
to restore to a higher DB2 version on the target system. ) Restoring to a higher DB2 version will automatically upgrade the database to the new version.

Get the offline backups to the target DB2 system.

Logged in as the new instance owner on the DB2 target system make sure to set the following DB2 variable so the DBADM role is giving to the user that is performing the restore.

C:\>db2set DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON

Make sure to stop and start the DB2 instance.

db2stop
db2start

See the following technote about this command. “Grant the new instance owner rights on all new restored databases”. -> http://www-01.ibm.com/support/docview.wss?uid=swg21568865

Navigate to the path where you placed the backups from the source system.
As an example we use the Activities OPNACT database. Use the following command
to start the restore of the OPNACT database. By using the “redirect generate script” parameter you get the option to change the paths where to redirect to.

db2 "restore db OPNACT from . ON "z:" into OPNACT redirect generate script dbrestore_OPNACT.txt"

After running this commando open the dbrestore_OPNACT.txt file. For the OPNACT
database I had to make the following changes. It depends per Connections database as some have more tablespace containers than the others.

Enable ( remove the leading — ) and change the used path values.
Find here the original and the modified one. The new paths to choose are up to yourself ( as far as I can tell ).

NEWLOGPATH ‘Z:\DB2IIC\NODE0000\OPNACT\’
REPLACE EXISTING

SET STOGROUP PATHS FOR IBMSTOGROUP
ON ‘Z:’

PATH   ‘Z:\DB2IIC\NODE0000\SQL00001\OATMPTABSPACE’

FILE   ‘Z:\DB2IIC\NODE0000\SQL00001\OAREGTABSPACE’              4480

 

If the database already exist on the target system and you want restore into that database/replace make sure the NEWLOGPATH directory is empty else first
remove all log files inside that directory.

del /s /q /F Z:\DB2IIC\NODE0000\OPNACT\NODE0000\*.*

Now run the modified SQL statement to complete the restore.

db2 -tvf dbrestore_OPNACT.txt

Check if you can connect to the restored database.

Capture

 

 

If you have restored all the databases use the 5.5 day1 upgrade scripts to upgrade
to the IBM Connections 5.5 level.

This entry was posted in db2, ibm connections and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please leave these two fields as-is:

Protected by Invisible Defender. Showed 403 to 807,335 bad guys.