By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,918 Members | 2,040 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,918 IT Pros & Developers. It's quick & easy.

reclaim disk space

P: n/a
does a command like,
db2 drop table tabschema.tabname when run from the Aix prompt reclaim
the disk space? Are there any other options? How can we make sure the
disk space is reclaimed?
Thanks,
Yasaswi
Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
ya*****@encfor.com (Yasaswi Pulavarti) wrote in message news:<aa**************************@posting.google. com>...
does a command like,
db2 drop table tabschema.tabname when run from the Aix prompt reclaim
the disk space? Are there any other options? How can we make sure the
disk space is reclaimed?
Thanks,
Yasaswi


Do you mean reclaim within the tablespace? or do you mean reclaim
within the file system?

If the tablespace is SMS you will reclaim space within the file
system.

If it is DMS it will reclaim space within the tablespace for other
tables/indexes to be created within the same tablespace, but it will
not reclaim space for the file system.
Nov 12 '05 #2

P: n/a
I think it will reclaim the space, you can have a look at the
tablespace and find out if the number of free pages (DMS) increases or
not. However, the OS/filesystem will not report any reduction in
comsumed space, as in DMS the space is preallocated to them.

db2 "list tablespaces show detail"

Used pages = 171115
Free pages = 21035

Incase of SMS, you should simply see a decrease in the number of used
pages. I think the OS/filesystem will reflect this reduction.

Probably, someone else can further point out on this one.

hth,
dotyet

ya*****@encfor.com (Yasaswi Pulavarti) wrote in message news:<aa**************************@posting.google. com>...
does a command like,
db2 drop table tabschema.tabname when run from the Aix prompt reclaim
the disk space? Are there any other options? How can we make sure the
disk space is reclaimed?
Thanks,
Yasaswi

Nov 12 '05 #3

P: n/a
Hi Mark:
So it there a command to force DMS to reclaim space on the OS as well?
Or by very definition that space is preallocated to DMS tablespaces, I
can never reclaim OS space on filesystem or specifically in the
"container".
Thanks,
Yasaswi

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

m0****@yahoo.com (Mark) wrote in message news:<a5**************************@posting.google. com>...
ya*****@encfor.com (Yasaswi Pulavarti) wrote in message news:<aa**************************@posting.google. com>...
does a command like,
db2 drop table tabschema.tabname when run from the Aix prompt reclaim
the disk space? Are there any other options? How can we make sure the
disk space is reclaimed?
Thanks,
Yasaswi


Do you mean reclaim within the tablespace? or do you mean reclaim
within the file system?

If the tablespace is SMS you will reclaim space within the file
system.

If it is DMS it will reclaim space within the tablespace for other
tables/indexes to be created within the same tablespace, but it will
not reclaim space for the file system.

Nov 12 '05 #4

P: n/a
I think you got it wrongly interpreted.
SMS -
As you drop a table, the table is actually a file in the SMS drirectory
container and the file is erased and the space is immediately reclaimed
at the file system level.
DMS-
Since the container is either a file or a raw device, the space WITHIN
that file is immediately reclaimed and made available but only to the
objects that have been created using that tablespace.
Since the file system space is allocated at creat tablespace time and
remains fixed unless you alter tablespace, then the sdpace NOT reclaimed
at the file system level.

To reclaim DMS dropped tables space from the file system in a DMS
container, you will have to "play" with the High Water Mark of the
containers and with the alter tablespace option of reduce or drop.
HTH, Pierre.

Yasaswi Pulavarti wrote:
Hi Mark:
So it there a command to force DMS to reclaim space on the OS as well?
Or by very definition that space is preallocated to DMS tablespaces, I
can never reclaim OS space on filesystem or specifically in the
"container".
Thanks,
Yasaswi

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

m0****@yahoo.com (Mark) wrote in message news:<a5**************************@posting.google. com>...
ya*****@encfor.com (Yasaswi Pulavarti) wrote in message news:<aa**************************@posting.google. com>...
does a command like,
db2 drop table tabschema.tabname when run from the Aix prompt reclaim
the disk space? Are there any other options? How can we make sure the
disk space is reclaimed?
Thanks,
Yasaswi


Do you mean reclaim within the tablespace? or do you mean reclaim
within the file system?

If the tablespace is SMS you will reclaim space within the file
system.

If it is DMS it will reclaim space within the tablespace for other
tables/indexes to be created within the same tablespace, but it will
not reclaim space for the file system.


--
Pierre Saint-Jacques - Reply to: sescons at attglobal dot net
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.
Nov 12 '05 #5

P: n/a
ya*****@encfor.com (Yasaswi Pulavarti) wrote in message news:<aa**************************@posting.google. com>...
Hi Mark:
So it there a command to force DMS to reclaim space on the OS as well?
Or by very definition that space is preallocated to DMS tablespaces, I
can never reclaim OS space on filesystem or specifically in the
"container".
Thanks,
Yasaswi

The containers in a DMS tablespace are pre-allocated to the OS.
However, you can reduce the size of containers in V8 (see "alter
tablespace" SQL statement). If you need to reduce the size of
containers to below the high-water mark, you may need to run db2dart
command (see the /LHWM option).
Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.