Results 1 to 4 of 4
  1. #1
    Join Date
    May 2012
    Posts
    155

    Unanswered: how to write the status of load in a table as a control mechanism Monday, Ma

    Hallo everyone,

    I would like to create a status table for my LOAD-commands.

    I have 3 different csv files, which have to be loaded regularly(every 3 days). I would like to create a status table, which gives me the status of the LOAD-commands(successfully? error? processing?)

    I am thinking about this table as status table:

    Code:
    CREATE TABLE dbschema.load_status (
                 day DATE,
                 load_file VARCHAR(20),
                 status VARCHAR(20)
    ) IN user_ratna INDEX IN user_ratna;
    My questions:
    1. What is the best practice to implement this?
    2. How can I implement the querying of the load status and to write this in above the table? I am thinking about:
    Code:
    DB2 LOAD QUERY TABLE schema.loadtable_1 NOSUMMARY
    But I actually want to just get the Tablestate (in progress, normal, ... )


    Thank you very much for the advices.

    Regards,

    Ratna

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    You might just look in db2diag.log -- LOAD progress and status are recorded. Something like db2diag -g DATA:=LOADID should work.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    May 2012
    Posts
    155
    Hallo n_i,

    thanks for the reply. It was a great hint.
    Code:
    db2diag -g DATA:=LOADID
    Do you have a clue, how I can tell DB2 that it should only give me the last load command status?

    Thank you.

    Regards,

    Ratna
    Last edited by ratnalein; 05-06-13 at 16:49.

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    You can specify the time range or indicate something like "within the last hour". Check the help for db2diag.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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