By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,333 Members | 1,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,333 IT Pros & Developers. It's quick & easy.

Move Tablespace Datafile

P: n/a
In my haste, I added a datafile to a tablespace, but I got it in the
wrong directory. Can I move a datafile of a tablespace?
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
aj
Buck Turgidson wrote:
In my haste, I added a datafile to a tablespace, but I got it in the
wrong directory. Can I move a datafile of a tablespace?


Short of a redirected restore, I don't know another solution.

For my SMS tablespaces, I always point DB2 at symbolic links that
then point at the actual container. I'm on Red Hat Linux - I'm
not sure if this can be done in Windows. This way, I can change
the container location by adjusting the symbolic link, and DB2
does not become irritated.

aj
Nov 12 '05 #2

P: n/a
Buck Turgidson wrote:
In my haste, I added a datafile to a tablespace, but I got it in the
wrong directory. Can I move a datafile of a tablespace?


You could try the (probably unsupported) idea of stopping DB2, moving the
file and setting a link in the wrong directory that points to the correct
place and, thus, makes the container logically available at the wrong
place.

I would do it this:
(1) add a container at the correct location
(2) remove the container at the invalid location
DB2 will take care of the rebalancing of the data.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 12 '05 #3

P: n/a
"Buck Turgidson" <jc***@hotmail.com> a écrit dans le message de
news:ok************@turf.coleman.com...
In my haste, I added a datafile to a tablespace, but I got it in the
wrong directory. Can I move a datafile of a tablespace?

Hi Buck,

You can do it with the db2relocatedb command, but you need to be offline.

HTH,

Jean-Marc
Nov 12 '05 #4

P: n/a
Isn't it true since version 8.x you can drop a container.
So I would cresate a new container in the right directory a drop the other.

Sample:

ALTER TABLESPACE TESTSPACE DROP ( FILE 'C:\DB2\NODE0000\CT1.cont' );

But look for rebalancing...

Best regards,
Joachim Müller

"Buck Turgidson" <jc***@hotmail.com> schrieb im Newsbeitrag
news:ok************@turf.coleman.com...
In my haste, I added a datafile to a tablespace, but I got it in the
wrong directory. Can I move a datafile of a tablespace?

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.