473,626 Members | 3,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
1 3401
On Mar 18, 10:26*am, "stefan.alb ert" <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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
8752
by: zebi | last post by:
hello, What's your opinion : The best type of temporary tablespace (DB2V7.2 SP 7 in AIX 4.3 / multiprocessor ) is DMS ou SMS ? Thanks ZEB
4
13037
by: Ulrich Sprick | last post by:
Hi all, (DB2 V7.1 for WinNT) I am looking for a way to determine the free space in my tablespace (containers), but I can't find out. The tablespace in question is a system managed tablespace in a raw partition. The Control Center always reports 100% usage (although I can insert data...). The "list tablespace containers for n show detail" command shows the number of usable pages, but they are almost equal to the total number of pages. ...
1
2141
by: Eugene | last post by:
Is there a way to capture I/O statistics per tablespace container? Or, as long as DB2 normaly stripes/rebalances data pages across containers, the number of physical reads and/or writes from a tablespace snapshot could just be devided by number of the tablespace's containers to get a rough estimate? Thanks, -Eugene
2
10243
by: Stanley Sinclair | last post by:
About to create a table which will "include" a BLOB. Am not sure how large to make the container and the tablespace. What I see says that BLOB is stored "separately." However, I don't know where. With a table kinda like: CREATE TABLE BLOB_TABLE ( BLOB_ID INT,
13
3337
by: Jean-Marc Blaise | last post by:
Hi there, I would like to know the meaning of direct_writes in a tablespace snapshot on a tablespace that is: * SMS (db2empfa ON) * Only 1 table is accessed in INSERT - Z locked (Not logged Initially mode) * No BLOB, long varchar ...in the table * No utility running
7
6265
by: CCC via DBMonster.com | last post by:
We use redirected restore to refresh test from prod on different AIX 5.2 servers. The databases have the same number, size and names of cooked containers. The only difference is the fully qualified path contains a different "SID": eg. "/db2/PRD/data1/..." versus "/db2/TST/data1/...". (Please note as an SAP installation I cannot change this layout). We use "set tablespace container" statements to redefine the fully qualified container...
4
7843
by: Buck Turgidson | last post by:
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?
5
4150
by: Mark A | last post by:
I have an OLTP database that has a tablespace that will start out at about 1 TB, but may grow to 75 TB's in size over the next 5 years. When I add new containers (on a new mount point), I want to use the BEGIN NEW STRIPE SET command to avoid rebalancing. Anyone know the maximum number of STRIPE SET's that can be created for a tablespace.
3
7511
by: Justin | last post by:
What is the difference between automatic and DMS Auto-resize tablespace?
0
8262
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8701
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7192
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.