Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

re-direct a restore to duplicate a database?

Status
Not open for further replies.

jpotucek

Technical User
Jan 26, 2005
144
US
We are running DB2 UDB V8 on Windows. Trying to figure out how to re-direct a restore to a new Database in the same instance.

Do I create a new DB first? Should I let the restore create the database? Can anyone guide me through the steps neede to do this?
 
Not sure with version 8, but with 7 you could simply create a new database from an existing backup.
In 7 this was done from control center, but in newer versions this is probably a new GUI

Ties Blom

 
I think 7 and 8 are pretty similar.. When we tried to do that (create new from an old backup) it seemed to want to step on the existing tablspace and indexspaces.. can you outline the steps for doing it through the GUI??? much appreciated!!!
 
From memory:

Open Control Center
Navigate to the database node
Choose create --> Database using wizard

There should be several options including creating a new database from an existing backup.

Ties Blom

 
Than you!! I guess what I'm confused about is the CONTAINERS tab. Do I have to specify new containers for a redirected restore?

Options are *Enable table space containers to be redirected during restore operation.
*Allow new container creation during roll-forward

Then it asks you to select the table space with containers to be redirected and then to specify the containers..

I just want to make sure that I'm doing it correctly so that I'm not overwriting anything in the source DB and just making a copy of it.. Sorry if this all sounds dumb.. but I'm a true newbie at UDB

 
The following article may be of use to you. It uses a CLP script (CLP = command line processing) and not a GUI.

Getting familiar with CLP is a good idea anyway, since it opens a world of additional functionality (The CLP is a direct route to every DB2 programming interface):


An oversight of CLP and other related stuff can be found here:



Ties Blom
 
Carefull with redirect restore: it does not only copy your data, but also your settings. It might be usefull to extend your restore script with the "AUTOCONFIGURE" verb to auto-adjust the setting to your new environment.
 
a) Create and configure database
b) Restore backup image to replace above database.

If you follow the above steps, your restored database will not "copy" db config from the backup image.

If you try to restore the image as a new database, then the db config from the backup image wil be copied over.

HTH

Sathyaram



For db2 resoruces visit More DB2 questions answered at &
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top