Results 1 to 9 of 9

Thread: temp files

  1. #1
    Join Date
    Sep 2002
    Posts
    456

    Post Unanswered: temp files

    O/S: Linux
    DB : UDB V7

    I have some files in sqllib/tmp directory which are marked as write protected and size of 0 (zero) bytes. Is it safe to remove them?

    Thanks in advance.

    dollar

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: temp files

    No ... Do not remove it ... It is used by DB2 under many occasions ... One such is sorting of index keys during default LOAD command ...


    Cheers
    Sathyaram

    Originally posted by dollar489
    O/S: Linux
    DB : UDB V7

    I have some files in sqllib/tmp directory which are marked as write protected and size of 0 (zero) bytes. Is it safe to remove them?

    Thanks in advance.

    dollar
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Mar 2003
    Posts
    343
    I would think that db2 would just recreate them if it needed to and they did not exist. the only impact would be the extra file create and formatting. But I don't know.

    Another question though - what else does db2 use these files for? And if data is autoloaded with temfilespath specified in the cfg file for the autoload, does db2 sort indexes in the tempfiles path or does it continue to utilize ~/sqllib/tmp?

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    sqllib/tmp will be used by LOAD only if tempfilespath is not specified ...

    A search on google shows:
    1) In troubleshooting guide, if db2start fails, one of the reasons could incorrect permissions on sqllib/tmp

    2) Exporting the client profile on client config assistant will store the output in sqllib/tmp directory

    Cheers
    Sathyaram

    Originally posted by cchattoraj
    I would think that db2 would just recreate them if it needed to and they did not exist. the only impact would be the extra file create and formatting. But I don't know.

    Another question though - what else does db2 use these files for? And if data is autoloaded with temfilespath specified in the cfg file for the autoload, does db2 sort indexes in the tempfiles path or does it continue to utilize ~/sqllib/tmp?
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Sep 2002
    Posts
    41
    Is these temp files behaves same in db2 for Sun Solaris ?
    I didn't see any tempfiles at sqllib/tmp directory in DB2 v7 on Sun Solaris 8. Is it applicable to Linux only?

    Thanks.


    Originally posted by sathyaram_s
    sqllib/tmp will be used by LOAD only if tempfilespath is not specified ...

    A search on google shows:
    1) In troubleshooting guide, if db2start fails, one of the reasons could incorrect permissions on sqllib/tmp

    2) Exporting the client profile on client config assistant will store the output in sqllib/tmp directory

    Cheers
    Sathyaram

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Temp files are normally deleted once they are no longer required ...

    For ex, in the LOAD once index building is done, the temp files in sqllib/tmp directory are cleaned up ...

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  7. #7
    Join Date
    Sep 2002
    Posts
    456
    We haven't done load in over a year so I am sure these files are not associated with any load. Our production operation is very simple, database runs 24/7 and we take online backup. Not that these files are taking any place that I am worried, I just don't like extra files laying around and the reason of their existence.

    Thanks to everybody for looking this up for me.

    dollar

    Originally posted by sathyaram_s
    Temp files are normally deleted once they are no longer required ...

    For ex, in the LOAD once index building is done, the temp files in sqllib/tmp directory are cleaned up ...

    Cheers
    Sathyaram

  8. #8
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Looks like sqllib/tmp is used even when you start a db2 command line processor .... And the directory does not get created automatically ...

    DB2 V8 on RH 8 :

    $ pwd
    /home/db2inst2/sqllib/tmp
    $ cd ..
    $ rmdir tmp
    $ db2 connect to sample
    DB21015E The Command Line Processor backend process request queue or input
    queue was not created within the timeout period.
    DB21015E The Command Line Processor backend process request queue or input
    queue was not created within the timeout period.
    $ mkdir tmp
    $ db2 connect to sample
    SQL1013N The database alias name or database name "SAMPLE" could not be
    found. SQLSTATE=42705
    $ ls -l tmp
    total 0
    prw------- 1 db2inst2 db2igrp1 0 Sep 13 16:44 I2225713C501
    prw------- 1 db2inst2 db2igrp1 0 Sep 13 16:44 R1125713C501
    $


    Sathyaram

    Originally posted by cchattoraj
    I would think that db2 would just recreate them if it needed to and they did not exist. the only impact would be the extra file create and formatting. But I don't know.

    Another question though - what else does db2 use these files for? And if data is autoloaded with temfilespath specified in the cfg file for the autoload, does db2 sort indexes in the tempfiles path or does it continue to utilize ~/sqllib/tmp?
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  9. #9
    Join Date
    Mar 2003
    Posts
    343
    Just discovered that the Governor startup and shutdown uses these files. However, in Unix, I do not see any temporary files for user connections.

    -rw-r----- 1 db2inst1 dbiadm1 20 Sep 13 22:59 DB2INST1.35.GDA
    -rw-r----- 1 db2inst1 dbiadm1 20 Sep 13 22:59 DB2INST1.98.GDA
    -rw-r----- 1 db2inst1 dbiadm1 20 Sep 13 22:59 DB2INST1.99.GDA
    -rw-r----- 1 db2inst1 dbaidm1 20 Sep 13 22:59 DB2INST1.9.GDA

    You will notice that the files have not changed since the 13th, yet I have command line connections all the time.

Posting Permissions

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