Transaction Log full

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hedonist123
    New Member
    • Dec 2007
    • 2

    Transaction Log full

    Hi,

    I am trying to move in around 25 lakh records into a table from 5 tables.

    However, I keep running into the below error

    "Data store driver error: [IBM][CLI
    Driver][DB2/6000] SQL0964C The transaction log for the database is
    full. SQLSTATE=57011" .

    I have increased the number of files and the filesize several times and now the parameters look like this:

    Log file size (4KB) (LOGFILSIZ) = 32000
    Number of primary log files (LOGPRIMARY) = 8
    Number of secondary log files (LOGSECOND) = 248

    Could someone please help me out?

    Thanks,

    Sharath
  • sakumar9
    Recognized Expert New Member
    • Jan 2008
    • 127

    #2
    1. You can make secondary log to -1. This is also known as infinite logging.
    2. Use COMMIT frequently. This will clear the active logs and you will not run out of logs.

    Let me know if your problem is addressed.

    Regards
    -- Sanjay

    Comment

    • docdiesel
      Recognized Expert Contributor
      • Aug 2007
      • 297

      #3
      Hi,

      to completly avoid the transaction logs, you could LOAD the data from the other tables into the destination table:

      Code:
      DECLARE myloadcursor CURSOR FOR
        select ...
        from ...
      ;
      
      LOAD FROM
        myloadcursor OF CURSOR
      INSERT INTO
        my.dest_table
        ...
      ;
      Afterwards, if necessary, delete the original rows from the source tables in small portions, e.g. by adding conditions to the DELETE stmt. And as sakumar9 mentioned, use COMMIT frequently.

      Regards,

      Bernd

      Comment

      Working...