Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2009
    Posts
    9

    Question LOAD REPLACE vs LOAD RESUME NO

    Hi,

    I have this confusion since long time.
    Could you please advise why there is a need for load resume NO.

    afterall, if the tablespace is empty we can happily go with load replace.

    is there any scenario where we need to especially use load resume NO?

    Please educate. Thank you.

  2. #2
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by tataforums
    Could you please advise why there is a need for load resume NO.
    There are three possible LOAD scenarios for a tablespace:
    (1) tablespace is empty and you have all new data in an external file
    (2) tablespace is not empty; you want to empty it first, then do (1)
    (3) tablespace is not empty; you have additional data to be added to it (like a set of INSERTs)

    RESUME NO is the default; it makes sure that you're in situation (1) so that you won't accidentially do (2) or (3) which are either nonrecoverable (2) or difficult to recover (3) unless you fall back to an image copy.

    Otherwise said: the default makes sure you don't do stupid things.

    Combined with REPLACE, you explicitly tell DB2 you want scenario (2), which is of course also not a RESUME. So REPLACE goes together with RESUME NO.

    RESUME YES tells DB2 you want to resume, i.e., continue with, the data already present in the table, i.e. you go for appending (scenario 3).
    This is of course incompatible with RESUME YES.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  3. #3
    Join Date
    Feb 2009
    Posts
    9

    Smile Thank you peter



    Thanks for your time and a good explanation.

  4. #4
    Join Date
    Apr 2012
    Posts
    2

    load resume yes

    Hello Peter,

    My case is another situtation which you didnt mentioned in above 3 condition, which is:
    4) My tablespace/ table is not empty; I have Few data which will update/ replace A PART OF some existing data to it (like a set of UPDATEs)
    Pls suggest me a suitable load option for this scenario!!!

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,649
    You cannot use LOAD utility to update records.

    LOAD is designed for speed to format records and 'dump' directly into the tablespace pages bypassing the "SQL layer"


    ==
    Last edited by sathyaram_s; 04-25-12 at 12:56.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  6. #6
    Join Date
    Apr 2012
    Posts
    2

    Thanks Sathya

    Thanks Sathya for the confirmation!!

  7. #7
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    You should start a new thread...but let's say you have LOTS of Data and you need to apply updates to, and then you need to load new data

    And let's also assume you have 1 table in the tablespace

    And there's no RI

    I would, Unload the Data using SQL, modifying the columns I wanted, into a file

    I would then concat that file with the new file and do a LOAD REPLACE
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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