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 > Release of physical space

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-27-04, 06:38
magro magro is offline
Registered User
 
Join Date: Nov 2003
Posts: 5
Question Release of physical space

Hello!

I'm not very experienced with the background processes of space management behind DB2, so my question may be stupid.... I already searched the DB2 Administration Guide and the dbforums.com archives, but I fear I'm searching with the wrong search terms.

DB2 Version 7, runnning under OS/390.

I have a 3 big tables (each 40GB+) in 3 tablespaces and lots of the information isn't needed anymore, but should be "retrievable". I'm getting problems with the space management guys.

Now I'm unloading parts of the content with DSNUPROC and sending the SYSREC00s to MIGRATIONLEVEL2, thereafter deleting the rows in the tables.

Now the question is: when is the physical disk space behind the tablespace actually reduced? Does a REORG suffice? Is there anything else I have to do? All the tuning guides only have information about extending the tablespaces or compressing data that remains online but what about getting rid of it?

Thanks for your help!

M.
Reply With Quote
  #2 (permalink)  
Old 01-27-04, 06:56
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Normally a REORG will restore the size of the dataset allocation to the PRIQTY size specified in the CREATE or ALTER TABLESPACE command. Of course, if the data will not fit in the PRIQTY, then DB2 will start allocating secondary extents as specified in SECQTY.

However, if you allocated your own VSAM datasets instead of using STOPGROUPS, then the PRIQTY and SECQTY are defined in the VCAT definition outside of DB2.

If the PRIQTY is too large for the remaining data on the table, then lower this value and perform a REORG. DB2 will delete and recreate the underlying VSAM dataset as part of the REORG using the new dataset space allocations you defined.
__________________
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
  #3 (permalink)  
Old 01-27-04, 07:12
magro magro is offline
Registered User
 
Join Date: Nov 2003
Posts: 5
Thumbs up

Quote:
Originally posted by Marcus_A
Normally a REORG will restore the size of the dataset allocation to the PRIQTY size specified in the CREATE or ALTER TABLESPACE command. Of course, if the data will not fit in the PRIQTY, then DB2 will start allocating secondary extents as specified in SECQTY.

However, if you allocated your own VSAM datasets instead of using STOPGROUPS, then the PRIQTY and SECQTY are defined in the VCAT definition outside of DB2.

If the PRIQTY is too large for the remaining data on the table, then lower this value and perform a REORG. DB2 will delete and recreate the underlying VSAM dataset as part of the REORG using the new dataset space allocations you defined.
Thanks a lot! I'm working with STOGROUPS and I'll do that. I just wasn't sure if REORG was automatically reducing the VSAM datasets.

Regards,

M.
Reply With Quote
  #4 (permalink)  
Old 01-27-04, 10:08
mixxalot mixxalot is offline
Registered User
 
Join Date: May 2003
Posts: 369
how about DB2 UDB and space?

How does this differ with tablespace allocation and reorgs on DB2 UDB running under UNIX?
Reply With Quote
  #5 (permalink)  
Old 01-27-04, 10:34
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Unfortunately, it is different for other DB2 platforms. DB2 for OS/390 is much easier in this regard.
__________________
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