Too much space in DB XMETA db2

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Re: Just a thought...

Post by ArndW »

jdmiceli wrote:Once all of settings suggested by ArndW and JRodriguez have been implemented, wouldn't recompiling clear the logs? That is what happens when I recompile my Server stuff. Just wondering...
Recompiling doesn't clear the logs, unfortunately.

The DBA should also reorganize the schema after the log entries are gone in order to recover the disk space used.
serices
Participant
Posts: 12
Joined: Tue Jan 03, 2006 12:31 pm
Location: Chile

Post by serices »

I thought there would be the answer to my problem, but unfortunately do not have a DBA for DB2 and the logic of the DB is not easy to learn. The solutions presented here serve only to improve the reading logs.
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Post by MT »

serices wrote:I thought there would be the answer to my problem, but unfortunately do not have a DBA for DB2 and the logic of the DB is not easy to learn. The solutions presented here serve only to improve the reading logs.
Hi,

well this is why DBAs are still needed :-)
Actually what you want to achive is not the simplest task in DB2.
First off runn a reorg command on all the tables where you have deleted a lot of rows. Reorganization is done on table level in DB2 LUW (Linux, Unix and Windows).
So the command (from the shell ) could b
db2 reorg table <schemaname>.<tabname>

This will physically delete the rows which you just have marked as deleted so far.

Secondly because the space is allocated by tablespaces - in your situation by an automatic storage tablespace try running following command to reduce the size of the tablespace and returning it to the file system:

db2 alter tablspace <tablespacename> reduce

Any further reduction of space is a lot more work and needs someone with DB2 skills.

kind regards
Michael
serices
Participant
Posts: 12
Joined: Tue Jan 03, 2006 12:31 pm
Location: Chile

Post by serices »

Dear, its contribution was reduced from 22 GB to the space of my BD, but only 14% of total space.

1.2G ./T0000002
141G ./T0000003
8.0K ./T0000004/C0000000.TMP
12K ./T0000004
8.0K ./T0000001/C0000000.TMP
12K ./T0000001
33M ./T0000005
97M ./T0000000
8.0K ./T0000006/C0000000.UTM
12K ./T0000006
142G .

I appreciate your help and the rest will suggest to my boss to hire the services of a DBA.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... do we have a resolution now?
-craig

"You can never have too many knives" -- Logan Nine Fingers
serices
Participant
Posts: 12
Joined: Tue Jan 03, 2006 12:31 pm
Location: Chile

Post by serices »

It is a part of the solution, because even the BD XMET much space on the disc, this was what I did ...

- cd ../db2/../bin
- ./db2
- connect to xmeta user USER using PASSWORD
- select count(*) from xmeta.LOGGING_XMETAGEN_LOGGINGEVENT1466CB5F
- delete from xmeta.LOGGING_XMETAGEN_LOGGINGEVENT1466CB5F
- REORG TABLE xmeta.LOGGING_XMETAGEN_LOGGINGEVENT1466CB5F
- ALTER TABLESPACE XMETA REDUCE
Post Reply