Cannot connect to DB2 database after restoring an offline backup

Found the answer here.

I needed to run the command

db2 rollforward db database_name to end of backup and complete;

This commits everything to the logs and places the database in a no longer pending state, thus allowing connection to it. I needed to do this for each database restored.

EDIT: Found this nifty nugget while attending a DB2NightShow episode. With 9.7 FP2, they introduced a registry variable called DB2_RESTORE_GRANT_ADMIN_AUTHORITY. This is handy if you are restoring a backup from one instance to another, as it automatically grants instance owner SECADM, DBADM, DATAACCESS, and ACCESSCTRL on the databases restored. With 9.7 FP5, the setting is dynamic and does not require bouncing of the instance. I realize my original question had nothing to do with security, but it can be encountered and thought that this would be a handy tidbit placed here.


EDIT #2: I recently found out that if the backup is an offline backup based on an archival logged database, I could have included the clause WITHOUT ROLLING FORWARD in my RESTORE command. This would have taken the database out of roll forward pending state immediately upon successful restore, which would mean that I would not have had to then issue the ROLLFORWARD DB command.