Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    22

    Unanswered: Deleting files from SQLLIB\TMP?

    We are running DB2 8.2 on WIN 2000 server and db2 is installed on c drive, while the actual database is on different drive. The installation has been running since 2008 and now are are starting to get low on diskspace on drive c. I looked up, and noticed that there are many gigabytes of files under SQLLIB\TMP\<instance>\<database> folders. My guess is that most of this data is generated by using alter table command and having to re-load the table while doing so, but I am not 100% certain.

    The guestion is, is it safe to simply delete the files under SQLLIB\TMP or are there some considerations? Especially I would want to delete files under SQLLIB\TMP\<instance>\<database> folders since those files make about 99,9% of the disk use under SQLLIB\TMP.

    Thanks for any insight.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I believe that DB2 has changed the directory structure since 8.2 (no longer supported). Could you list the file names, date, and size of the contents of the directory so we see what they might contain?
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    22
    There are a lot of files in SQLLIB\TMP folder and it's subfolders but most of them are insignificant (very very small). The ones that actually use up the disk space are located on the subfolder \SQLLIB\DB2\TMP\VARASTO.4\DB2\NODE0000\CATN0000\20 120315 (there are numerous other similar subfolders for different dates as well).

    The directory contain files as follows:
    085245.001 022 220kb 15.3.2012 9:52
    085342.001 106 004kb 15.3.2012 9:54
    085650.001 735 512kb 15.3.2012 10:03
    090412.001 000 932kb 15.3.2012 10:04
    090437.001 192 068kb 15.3.2012 10:06
    090653.001 001 064kb 15.3.2012 10:06
    etc..

    My guess is these files are generated due to export - import caused by use of control center alter table usage. Is it safe to delete them?

  4. #4
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    In the past I have been in a simular situation and I did remove those files without any harm done. I am NOT saying that I know what they are all about and that it is ABSOLUTELY save to remove them, I am just sharing my experiances.
    You could start to move them to another disk so you can put them back in case of an emergency....
    Somewhere between " too small" and " too large" lies the size that is just right.
    - Scott Hayes

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    These look like LOAD temporary files. If you don't have any failed or unfinished LOADs and you did a full backup recently, I'd say you can delete them. (Mind you, I'm not responsible for your system failure if you follow my advice).

  6. #6
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    VARASTO.4\DB2\NODE0000\CATN0000\20120315 is the backup image created by load with COPY YES option (identified by number "4" after the db name). You only need this file if you have to restore from a backup image and rollforward through this load operation.

    Load temp files are created in the db directory by default (db2 creates "load" subdir during load execution). The files mitait listed don't look like load temp files. GUI tools (db2 or third party), some snapshot functions, some applications (ie. WAS), etc... can write to this temp dir. Are the files readable?

  7. #7
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Quote Originally Posted by db2girl View Post
    VARASTO.4\DB2\NODE0000\CATN0000\20120315 is the backup image created by load with COPY YES option (identified by number "4" after the db name). You only need this file if you have to restore from a backup image and rollforward through this load operation.
    I think this is confusing. VARASTO.4\DB2\NODE0000\CATN0000\20120315 - this is a load copy (backup image of the LOADed data - not a database or tablespace backup image). You can't restore from it. It's used by db2 during ROLLFORWARD operation. The only time you need it is if you want to restore from a database/tablespace backup image taken prior to this LOAD operation and rollforward through it.

  8. #8
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    22
    Quote Originally Posted by db2girl View Post
    I think this is confusing. VARASTO.4\DB2\NODE0000\CATN0000\20120315 - this is a load copy (backup image of the LOADed data - not a database or tablespace backup image). You can't restore from it. It's used by db2 during ROLLFORWARD operation. The only time you need it is if you want to restore from a database/tablespace backup image taken prior to this LOAD operation and rollforward through it.
    This information was very helpfull. We did remove all the files we were sure not to need in any restore scenario (ie old enough ones) and everything works great. Many thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •