Results 1 to 3 of 3

Thread: Load

  1. #1
    Join Date
    Feb 2005
    Posts
    118

    Unanswered: Load

    In the os/390 world, emptying a table without any logging overheads was quite simple.
    Simply LOAD REPLACE using an DUMMY dataset WITH LOG NO option.
    Is there an equivalent concept for UDB Db2 on Windows.
    I tried the following but no luck.
    1. EXPORT from tab1 (making sure no rows are returned)
    use the LOAD command and specify the empty file.
    LOAD didn't go thru because it didn't like the file format
    2. EXPORT 1 row from tab1
    use LOAD with REPLACE option and non-recoverable (for LOG NO)
    one row was replaced, which means row count hasn't changed. the purpose of loading one row (replacing data with one row) was defeated.

    Bottomline, my question is
    In UDB DB2 for Windows, how do you empty a large table without incurring any LOG overheads ?

    thanks.
    Anil

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    load from /dev/null of del replace into tablename nonrecoverable

    On windoes, use a empty file instead of /dev/null

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

  3. #3
    Join Date
    Jan 2003
    Posts
    1,605
    On Windows:
    Code:
    load from nul: of del replace into schema.tablename
    or even better if more tables are in one tablespace (load locks tablespace in inclusive mode)
    Code:
    import from nul: of del replace into schema.tablename

Posting Permissions

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