If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > PLEASE HELP with Alter tablespace

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-16-06, 17:14
db2kevin db2kevin is offline
Registered User
 
Join Date: Jun 2006
Posts: 27
PLEASE HELP with Alter tablespace

Hi All,

My tablespace space is allocated with high number of pages: therefore I want to resize the tablespace.

Do I need to unload data before run ALTER tablespace with RESIZE option to secure the data and load it again after ALTER tablespace with RESIZE done to make sure that the data in my tables is instant.

In addition, how can I test if my data is instant after resize the tablespace.

The first question is more important.

Thx everyone.
Reply With Quote
  #2 (permalink)  
Old 08-16-06, 21:26
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You do not need to move the data off the tablespace, however, you cannot lower the container sizes below the high water mark. If there are now fewer rows than previously in the table, the high water mark can be lowered using db2dart (but you may need to reorg first).

If you have more than one container in the tablespace, you need to resize them together in the same SQL statement, otherwise as soon as you resize one container, DB2 will try to rebalance the containers.

You can see the size (including high water mark) with:

connect to sample
db2 list tablespaces show detail

For each tablespace number, you can see the container sizes with:

db2 list tablespace containers for 0 [this is the tablespace number from above command).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On