IBM Support

STEP BY STEP HOW TO RESTORE DATABASE AND ROLLFORWARD TO EARLIEST POINT OF TIME

Question & Answer


Question

How do I restore my database?

Cause

Need to restore MAXIMO database.

Answer

The IBM® Maximo® Asset Management application automatically creates database backups. Locate the backup image you want to use. In this example the backups are stored under C:\Users\Administrator

If using Windows, open the DB2 CLP by entering the following command at a Windows command prompt:

db2cwadmin

Now you are ready to enter DB2 commands.

Make sure you are using the correct DB2 instance by entering:

db2ilist
db2 get instance

If you are using the wrong instance, change to it by entering:

set DB2INSTANCE=<instance name from db2ilist output above>

Then stop the DB2 instance and disable remote connections:


db2stop force
db2set DB2COMM=
db2start

Now, restore the database image you located:

- from the backup file image name, you can get the timestamp required. In this example, the backup file name is "MAXDB75.0.MAXDB.DBPART000.20150929203154.001"

- enter the following command:

db2 -v "RESTORE DATABASE MAXDB75 USER <user> USING <pwd> FROM C:\Users\Administrator TAKEN AT 20150929203154 WITHOUT PROMPTING"

Next you will need to rollforward the database to bring it back online. To do so, enter the following:

db2 -v "ROLLFORWARD DB MAXDB75 TO END OF BACKUP AND COMPLETE"

Finally, bring the instance online and connect to the database:

db2stop force
db2set DB2COMM=TCPIP
db2start
db2 connect to maxdb75 user <user> using <pwd>

The database should now be online.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Recovery - Restore","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;10.1;10.5","Edition":"Enterprise Server;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21968292