Professional Web Applications Themes

Summary Table and Import - IBM DB2

Developer has been used to using import from /dev/null to quickly delete all rows from a table. I prefer they not use an unqualified delete due to large number of rows that would be logged. Now a simple summary table has been created based upon this base table. Now that the summary table exists and is defined as refresh immediate, the import no longer works: import from /dev/null of del replace into tabschema.tabname SQL3109N The utility is beginning to load data from file "/dev/null". SQL3201N The specified table cannot be replaced because another table is dependent on it There are ...

  1. #1

    Default Summary Table and Import

    Developer has been used to using import from /dev/null to quickly
    delete all rows from a table. I prefer they not use an unqualified
    delete due to large number of rows that would be logged.

    Now a simple summary table has been created based upon this base
    table.

    Now that the summary table exists and is defined as refresh immediate,
    the import no longer works:

    import from /dev/null of del replace into tabschema.tabname
    SQL3109N The utility is beginning to load data from file
    "/dev/null".

    SQL3201N The specified table cannot be replaced because
    another table is
    dependent on it

    There are no other dependent tables (as in foreign key relationships).


    Trying different things, I came across the following steps:

    1. load base table from /dev/null (puts base table in check pending)
    2. set integrity on base table
    3. refresh summary table
    4. backup base table

    I don't like this option, as the application userid does not have (nor
    can I grant without giving other authorities I'd rather not give) the
    authority to backup a table.

    Another alternative is to:

    1. alter summary table as DEFINITION ONLY
    2. import the base table from /dev/null
    3. alter the summary table with the "full select"
    4. refresh the summary table

    This seems like a lot of extra work (especially the need to store the
    full select).

    Does anyone have a better solution for this?

    Thanks,

    Kristi
    Kristi Guest

  2. #2

    Default Re: Summary Table and Import

    Have you looked at the load option COPY YES?

    "Kristi Close" <com> wrote in message
    news:google.com... 


    Erik Guest

  3. #3

    Default Re: Summary Table and Import

    What about a non-recoverable load operation?



    com (Kristi Close) wrote in message news:<google.com>... 
    Leo Guest

  4. #4

    Default Re: Summary Table and Import

    net (Leo) wrote in message news:<google.com>... 

    I hesitate to implement this suggestion ("NONRECOVERABLE") as that
    places the tablespace into a questionable state for recovery. Even
    though this data starts out empty (using /dev/null as input to import)
    that doesn't mean I don't care about the data afterwards.

    The load with COPY YES has possibilities, as long as I (we) know not
    to depend on this _copy_ (that's not a backup) as a valid for
    recovery.



    Kristi
    Kristi Guest

Similar Threads

  1. summary table
    By Shane in forum IBM DB2
    Replies: 2
    Last Post: October 11th, 04:39 AM
  2. How to derive summary info from one single table..
    By Anith Sen in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: July 8th, 01:43 PM
  3. Summary fields or Summary table?
    By Scott in forum FileMaker
    Replies: 1
    Last Post: June 27th, 03:34 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139