• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1011
  • Last Modified:

How do you restore a 15 DB2 Database Partition to 7 DB2 DB partitioned target database (Such as Prod to QA database)?

Hi all,

I have a 15 Database partitions on my production DB2 and 7 database partitions for my QA Test database. I need to restore to test environment the backup image copy of my production Db2 database to the 7 partitioned Test Database.
How can this be done efficiently with best practice in mind?
0
Enyinnaya
Asked:
Enyinnaya
2 Solutions
 
momi_sabagCommented:
i don't think you can do that
i think the only way to "cut down" the number of partitions is either use export on the prod machine and then import on the test machine (and the records will get distributed correctly), or you can recover the prod backup to an identical structure in test (15 partitions) and then manually merge some of the partitions until you narrow it down to 7

the question to ask is, why can't you have 15 partitions in the test system? it will occupy the same amount of space if all the data is copied, so i don't see any logic behind that decision
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Howdy....

Starting with UDB 9.5, you can backup and restore multiple partitions with a single backup.

  http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=%2Fcom.ibm.db2.luw.wn.doc%2Fdoc%2Fc0051390.html

Keep in mind that the backup/restore process essentially copies a database, or in this case the partitions of a database.  When the restore is complete, the restored database will have the characteristics of the original database.  The process will not perform any fundamental changes to the database, like repartitioning.

If you need the restored database to have half the partitions of the original database, you'll need to micro-manage that.  And it will likely be a painful process.


Kent
0
 
EnyinnayaAuthor Commented:
You guys ROCK!!
Thanks
0
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.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now