467,903 Members | 1,886 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,903 developers. It's quick & easy.

move a tablespace (sms containers) to different location

Hi folks,
we have 3 instances where a table space (good old SMS) lives in the
wrong directory.
Normally I simply would create a new one and do a INSERT ... SELECT
for all tables (or a load ... from cursor). But we have different
tables in the table space and I want to use the same "script" for all
instances.
So I had a look at db2relocate, which should do the trick. I have the
following plan to do this:
0) backup -- always good
1) quiesce tablespace for table ONE.OF_THEM exclusive
2) cp -p OLD_CONT_DIRs NEW_CONT_DIRs
3) rename OLD_CONT_DIRs
4) db2relocate -f reloc.cfg
5) quiesce tablespace for table ONE.OF_THEM reset

Does anybody have any experience with this? Or any further
suggestions?
Thanks in advance,
Stefan
Mar 18 '08 #1
  • viewed: 3011
Share:
1 Reply
On Mar 18, 10:26*am, "stefan.albert" <stefan.alb...@spb.dewrote:
Hi folks,
we have 3 instances where a table space (good old SMS) lives in the
wrong directory.
Normally I simply would create a new one and do a INSERT ... SELECT
for all tables (or a load ... from cursor). But we have different
tables in the table space and I want to use the same "script" for all
instances.
So I had a look at db2relocate, which should do the trick. I have the
following plan to do this:
0) backup -- always good
1) quiesce tablespace for table ONE.OF_THEM exclusive
2) cp -p OLD_CONT_DIRs NEW_CONT_DIRs
3) rename OLD_CONT_DIRs
4) db2relocate -f reloc.cfg
5) quiesce tablespace for table ONE.OF_THEM reset

Does anybody have any experience with this? Or any further
suggestions?
Thanks in advance,
Stefan
Here my results :

Step 2) failed - because DB2 holds a lock on the files.
Step 1) db2stop (force)
Step 5) db2start

The file reloc.cfg defines the old and new locations.

It worked fine for me.
Mar 25 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Ulrich Sprick | last post: by
1 post views Thread by Eugene | last post: by
2 posts views Thread by Stanley Sinclair | last post: by
13 posts views Thread by Jean-Marc Blaise | last post: by
7 posts views Thread by CCC via DBMonster.com | last post: by
4 posts views Thread by Buck Turgidson | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.