Unable to kill Incomplete Db2 Restore: How can I use extreme force/Abort to release the databse?

Hi Database Gurus,

I did a redirected restore on a DB2 database using a backup image from a production instance, generated the script, made neccessary changes to the script - ran the set tablespaces commands, changed the container paths and all looked well. After runnig the redirect script, I observed that it appeared to have hanged. Now I am in the situation that if I issue a restore complete it says "DB21080E No previous RESTORE DATABASE command with REDIRECT...." and if I try to do anything else that involves a connection (including trying to drop the damn database) I get "SQL1119N A connection to or activation of database "RAPMT02" cannot be made because a previous restore is incomplete. SQLSTATE=57019".

I have tried "DB2 restore...ABORT..." with no success. I do a ps -ef | grep - restore, get the PID and have also tried to kill
-9 PID but that did not allow me to connect to the database either giving me the "DB21080E No previous RESTORE DATABASE command with REDIRECT....".

I will like not to have to drop the Database. So anyone have any ideas? Can I salvage the restore? If not how can I remove the damaged db so I can start again? If possible, I appreciate an answer tonight as I am working to fix this problem on a deadline.



Thanks all
EnyimbaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent OlsenData Warehouse Architect / DBACommented:
Hi Enyimba,

You need to abort the previous restore.


db2 "restore database {alias} ABORT"

On older versions of DB2 you sometimes had to include some of the load parameters.  But try it like the example to start.


Good Luck!
Kent
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EnyimbaAuthor Commented:
thanks kdo
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB2

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.