RE: Claim unused space from db2 files? [SEC=UNCLASSIFIED]

RE: Claim unused space from db2 files? [SEC=UNCLASSIFIED]

 

  



Don't want to do any editing, here it goes

Db2 -x "select 'db2 reorg table ' || rtrim(tabschema) || '.' || tabname
|| '
ALLOW NO ACCESS ;' from syscat.tables where tbspace = 'USERSPACE1'" >
reorg.txt

Cheers !!!!!!


---------------------------------------------------
Regards,

Vijay



-----Original Message-----
From: Glyn Owen
[mailto:db2udbdba-ezmlmshield-x15787523.[Email address protected]
Sent: Saturday, January 19, 2008 5:37 PM
To: LazyDBA Discussion
Subject: Re: Claim unused space from db2 files? [SEC=UNCLASSIFIED]

Hello,

I have copied in my reminder notes on how I reclaimed the unused table
space.

db2 "select 'db2 reorg table ' || rtrim(tabschema) || '.' || tabname ||
'
ALLOW NO ACCESS ;' from syscat.tables where tbspace = 'USERSPACE1'" >
reorg.txt Run the output after slight editing - connect & remove blank
lines etc

db2dart nm_pr_cp /LHWM /TSI 2 /NP 2500000 db2dart nm_pr_cp /RHWM /TSI 2


The nm_pr_cp is the database and it must be stopped.
/RHWM works better than /LHWM but needs a backup after.

/LHWM suggest how to lower high water mark

/TSI 2 on TableSpace Id 2

/NP 2500000 the new target for the high water mark.



Follow the advice and then run


alter tablespace userspace1 resize (all 1 G) alter tablespace userspace1
resize (all 5334 M)


where all containers will be reset to 1 Gigabyte in size.
In userspace1 on nm_pr_cp where there are 6 containers the
tablespace will end up as 6 gigabytes.




Option RHWM requires a database backup afterwards


Regards
Glyn Owen

NOTICE
This e-mail and any attachments are intended for the addressee(s) only
and may be confidential. They may contain legally privileged or
copyright material. You should not read, copy, use or disclose them
without authorisation. If you are not the intended recipient please
contact the sender as soon as possible by return e-mail and then please
delete both messages. This notice should not be removed.


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.

--------
IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.



DB2 & UDB email list listserv db2-l LazyDBA home page