[ corrected top-posting ]
"Ulrich Sprick" <ul***********@gmx.de> a écrit dans le message de
news:bu************@ID-126690.news.uni-berlin.de... 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.
Am I missing something here? Any hints appreciated!
Thanks in advace,
ulrich
"Pierre Saint-Jacques" <se*****@invalid.net> schrieb im Newsbeitrag
news:Ef**********************@weber.videotron.net. .. Are you quite sure!!! In DB2 V7 ( and V8 for that matter), I've alweays
thought that Raw Device containers could only be defined for DATABASE
managed tblspc.
I would think that it has to be a DMS if on raw.
If it is really a SMS then it is defined on a file system (has to, must
be). In this case the container is a directory path and will never show that
level of detail
HTH, Pierre.
"Ulrich Sprick" <ul***********@gmx.de> wrote in message
news:bu************@ID-126690.news.uni-berlin.de... Hi,
You are right, sorry, of course it is a database managed storage (DMS).
But still the problem: How do I determine how full is it?
ulli
For SMS-managed storage, the tablespace will always appear to be 100% full.
This is because space is allocated in the filesystem (for the tablespace
containers) on an as-needed basis. There usually isn't any free space in
SMS containers, unless rows have been deleted and the space has not been
reclaimed (by inserting new rows or by doing a reorg.)
For DMS-managed storage, "Useable pages" will always be close to "Total
pages". The difference between these two values are the number of pages
that DB2 uses for control structures (container tags, extent maps, etc.)
What you really want to look at is the number of "Free pages". "list
tablespaces show detail" will show you the number of useable and free pages
in the tablespace. (In this case, 28672 of 146688 useable pages are free,
so the tablespace has about 20% free.)
Tablespace ID = 24
Name = TS_RAND
Type = Database managed space
Total pages = 147183
Useable pages = 146688
Used pages = 118016
Free pages = 28672
Unfortunately (to answer your original question), DB2 only lists "Free
pages" at the tablespace level, not at the container level. However, since
DB2 accesses containers in a round-robin fashion (on an extent basis), each
container will generally have the same amount of free space -- assuming that
each of your containers is the same size.
--
Matt Emmerton
DB2 OLTP Performance
IBM Toronto Lab