How to Solve Db2 SQL0752N Error

Db2 SQL0752N Error

SQL0752N Error message and explanation of this error is:

SQL0752N error usually occurs on redirected restore.

SQL0752N Error means, one or more of your databases is in restore pending state. You must fix problems about restore pending database.

First of all you must get output of this simple command:

As you may see, our DB2 dabatase is in restore pending state. (It also might be in rollforward pending state, but firstly you must solve restore pending issue first)

Main reason of this error is an error on restore operation. Usually this kind of errors and problems occur in redirected restore. Because DB2 knows how to handle restore operation while you are restoring a database to same instance.

On redirected restore, you need to set some paths and files to complete restore.

First of all drop test database.

If you don’t use generated script to make a redirected restore, you’ll be more likely to fail. Because a redirected restore script can help you to avoid mistakes.

This command generates a redirected restore script. You can set, log path, db path and table space paths using this script.

Open your redirected restore script via vim (or your other favorite text editor).

Set you log path, database path and table space paths. Be careful about these values. Your restore may fail because of these values. For example, if you are trying to restore, to a file table space, and you already have a folder on same path, you will get SQL0752N error.

After editing you clp file run this command to complete restore:

If you have successfully complete restore, you must get this output:

Now your database is ready.

Leave a Reply

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