Professional Web Applications Themes

Commits on sql questions - IBM DB2

Using 6.1, Copying data in one large table to another using sql and do not know how to issue a commit. (say every 5000 records) to keep the log files from filling up. I can find no informations on this... db2load is not practical here....

  1. #1

    Default Commits on sql questions

    Using 6.1, Copying data in one large table to another using sql
    and do not know how to issue a commit. (say every 5000 records)
    to keep the log files from filling up.

    I can find no informations on this...
    db2load is not practical here.
    Al Guest

  2. #2

    Default Re: Commits on sql questions

    "Al Murry" <net> wrote in message
    news:net... 

    Are you sure you can't do an export (with an SQL statement you provide) and
    then an import to insert the rows with a commit interval?

    If not, you will need to open a select cursor in your program WITH HOLD
    option (keeps cursor open even after a commit), fetch the row one at a time,
    then insert into other table for each row fetched, then commit at the
    desired interval.


    Mark Guest

  3. #3

    Default Re: Commits on sql questions

    On Mon, 20 Oct 2003 16:27:37 +0000, Mark A wrote:
     
    >
    > Are you sure you can't do an export (with an SQL statement you provide) and
    > then an import to insert the rows with a commit interval?[/ref]

    "with a commit interval" Thats what I cannot find is how to commit
    after every nnn rows.

    TS
    Willard Guest

  4. #4

    Default Re: Commits on sql questions

    > >> Using 6.1, Copying data in one large table to another using sql 
    > >
    > > Are you sure you can't do an export (with an SQL statement you provide)[/ref][/ref]
    and 
    >
    > "with a commit interval" Thats what I cannot find is how to commit
    > after every nnn rows.
    >
    > TS[/ref]

    COMMITCOUNT n
    Performs a COMMIT after every n records are imported.

    This is for the import utility on DB2 UDB for Linux, Unix, and Windows
    Version 7 or 8 (I don't know anything about version 6, which I believe is
    unsupported).

    If writing your own SQL, you must code the logic yourself.


    Mark Guest

Similar Threads

  1. #39910 [NEW]: latest filter commits breaks compilation
    By judas dot iscariote at gmail dot com in forum PHP Bugs
    Replies: 1
    Last Post: December 20th, 07:48 PM
  2. Questions regarding CR.NET
    By TaeHo in forum ASP.NET General
    Replies: 5
    Last Post: August 15th, 05:43 AM
  3. 2 questions :) - portal questions
    By John Weinshel in forum FileMaker
    Replies: 3
    Last Post: July 14th, 04:37 AM
  4. Intermittent Commits
    By Michael in forum Oracle Server
    Replies: 5
    Last Post: July 8th, 11:56 AM
  5. autocommit ON but no commits visible in v$sqlarea
    By Hans de Git in forum Oracle Server
    Replies: 11
    Last Post: January 8th, 08:57 AM

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