473,386 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Move Tablespace Datafile

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
4 7816
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Srini | last post by:
In our Oracle installation on SCO Unix, we have reached almost 100% of tablespace allocated to Oracle. Now we have deleted a large table from the database after taking backup elsewhere. Now if we...
0
by: sandeep G | last post by:
I've a table which has a number & a blob column, both of which are NOT NULL type. This table is composite partitioned using range & hash on the same column. Each partition is sub partitioned into...
1
by: Jens H. Hamann | last post by:
Hi, I am having a strange problem with the storage parameters in Oracle 9.2.0.1 database. I create a tablespace with some default storage parameters but when i am adding a table to the tablespace...
1
by: gecho | last post by:
New to oracle, but I'm coming from the sybase side. I took over one of our oracle production databases (1.5 Tb) while the regular dba is out. I got errors (unable to extend temp segment) for two...
1
by: mario dionne | last post by:
I looking for a tool or function or script who can generated DB2 DDL tablespaces with datafile on AIX. (I known DB2LOOK and the function doesn't generated the DB2 DDL tablespaces with DATAFILE)....
0
by: Mats Kling | last post by:
Hi all! I need to move a Storage management view from one tablespace to another and I can't find any info on how to move it to another tablespace. is it enought just to move (delete and...
6
by: hikums | last post by:
How to accomplish a tablespace move from 32K to 4K page size on AIX 5.2, DB2 UDB 8.2? Enable forward recovery, take 32K tablespace backup, drop 32K tablespace, create 4K tablespace, restore to...
8
by: Mark D Powell | last post by:
I obviously did not search the archives on the right terms so what is the easiest and fastest way to move a 3G database from a nearly full C drive to the nearly empty D drive that should have been...
1
by: mvsmsh | last post by:
Hi, Are there any procedure or commands moving one table into new tablespace from old tablespace , where it has multiple tables in one tablespace ? Here's my scenario for moving...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.