Thanks for the answer. However, I was getting this error when I am trying to perform the DB restored.
Code:
SQL2519N The database was restored but the restored database was not upgraded
to the current release. Error "-1224" with tokens "-2029060040 * * * *
SEMAPHORE WAIT " is returned.
Below are the command I used in DB2 CLP. What I am trying to do is, first I created a empty database with the same DB name as the backup. Then, replace the whole DB using the backup.
Code:
db2 => db2start
DB20000I The DB2START command completed successfully.
db2 => attach to DB2
Instance Attachment Information
Instance server = DB2/NT 9.7.2
Authorization ID = ADMIN01
Local instance alias = DB2
db2 => connect to COMDB
Database Connection Information
Database server = DB2/NT 9.7.2
SQL authorization ID = ADMIN01
Local database alias = COMDB
db2 => RESTORE DATABASE COMDB FROM "C:\backup" TAKEN AT 20110301162745 TO "C:" INTO COMDB REDIRECT
SQL2523W Warning! Restoring to an existing database that is different from
the database on the backup image, but have matching names. The target database
will be overwritten by the backup version. The Roll-forward recovery logs
associated with the target database will be deleted.
Do you want to continue ? (y/n) y
SQL1277W A redirected restore operation is being performed. Table space
configuration can now be viewed and table spaces that do not use automatic
storage can have their containers reconfigured.
DB20000I The RESTORE DATABASE command completed successfully.
db2 => SET TABLESPACE CONTAINERS FOR 0 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\COMDB_DB\CATTBS")
DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
db2 => SET TABLESPACE CONTAINERS FOR 1 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\COMDB_DB\TMPTBS")
DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
db2 => SET TABLESPACE CONTAINERS FOR 2 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\COMDB_DB\USRTBS")
DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
db2 => SET TABLESPACE CONTAINERS FOR 3 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\COMDB_DB\SYSTOOLSPACE")
DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
db2 => SET TABLESPACE CONTAINERS FOR 4 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\COMDB_DB\SYSTOOLSTMPSPACE")
DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
db2 => RESTORE DATABASE COMDB CONTINUE
SQL2519N The database was restored but the restored database was not upgraded
to the current release. Error "-1224" with tokens "-2029060040 * * * *
SEMAPHORE WAIT " is returned.
db2 =>
While struggling to understand this error, I try to re-connect to the 'COMDB' database, I get the error message below:
Code:
db2 => terminate
C:\Program Files\IBM\SQLLIB\BIN>db2stop
C:\Program Files\IBM\SQLLIB\BIN>db2
db2 => db2start
db2 => attach to DB2
db2 => connect to COMDB
SQL5035N The database must be upgraded to the current release.
SQLSTATE=55001
So, I decide to give a try and use the upgrade command below. But it was a bit disappointed.
Code:
db2 => upgrade database COMDB
SQL1224N The database manager is not able to accept new requests, has
terminated all requests in progress, or has terminated the specified request
because of an error or a forced interrupt. SQLSTATE=55032
db2 =>
I am not really sure what I need to do in order to fix this problem

. Hopefully, some one could provide some suggestion.
Thanks.