9.1 Problem changing logging to circular

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • natG

    #1

    9.1 Problem changing logging to circular

    On a 64 bit linux, db2 9.1 system, I am trying to change logging to
    "circular" via:
    -----
    UPDATE DB CFG FOR MYDB7 USING logarchmeth1 OFF logarchmeth2 OFF
    logprimary 16 logsecond -1 logfilsiz 10240;
    -----
    I get back an error:
    ------
    SQL5153N The update cannot be completed because the following
    relationship would be violated:
    "logsecond can only be set to -1 if log archiving is enabled".
    ------
    However, logsecond IS set to -1, besides the fact that the above query
    is setting it as well.
    Also, the following sql did go thru ok:
    UPDATE DB CFG FOR MYDB7 USING logsecond -1;

    But, I still get the error mentioned when I try running the first
    aforementioned script.

    Please advise; Thanks.
    nat

  • Ian

    #2
    Re: 9.1 Problem changing logging to circular

    natG wrote:
    On a 64 bit linux, db2 9.1 system, I am trying to change logging to
    "circular" via:
    -----
    UPDATE DB CFG FOR MYDB7 USING logarchmeth1 OFF logarchmeth2 OFF
    logprimary 16 logsecond -1 logfilsiz 10240;
    -----
    I get back an error:
    ------
    SQL5153N The update cannot be completed because the following
    relationship would be violated:
    "logsecond can only be set to -1 if log archiving is enabled".
    ------
    However, logsecond IS set to -1, besides the fact that the above query
    is setting it as well.
    Also, the following sql did go thru ok:
    UPDATE DB CFG FOR MYDB7 USING logsecond -1;
    >
    But, I still get the error mentioned when I try running the first
    aforementioned script.
    As the error says, setting LOGSECOND to -1 (a.k.a. "Infinite Logging")
    requires that your database have archive logging enabled -- the concept
    of infinite logging makes no sense if you're trying to use circular
    logging.

    If you want to switch to circular logging, you MUST to set LOGSECOND to
    a value >= 0, in addition to turning LOGARCHMETH1/2 to OFF.


    Comment

    • natG

      #3
      Re: 9.1 Problem changing logging to circular

      On May 21, 3:59 pm, Ian <ianb...@mobile audio.comwrote:
      natG wrote:
      On a 64 bit linux, db2 9.1 system, I am trying to change logging to
      "circular" via:
      -----
      UPDATE DB CFG FOR MYDB7 USING logarchmeth1 OFF logarchmeth2 OFF
      logprimary 16 logsecond -1 logfilsiz 10240;
      -----
      I get back an error:
      ------
      SQL5153N The update cannot be completed because the following
      relationship would be violated:
      "logsecond can only be set to -1 if log archiving is enabled".
      ------
      However, logsecond IS set to -1, besides the fact that the above query
      is setting it as well.
      Also, the following sql did go thru ok:
      UPDATE DB CFG FOR MYDB7 USING logsecond -1;
      >
      But, I still get the error mentioned when I try running the first
      aforementioned script.
      >
      As the error says, setting LOGSECOND to -1 (a.k.a. "Infinite Logging")
      requires that your database have archive logging enabled -- the concept
      of infinite logging makes no sense if you're trying to use circular
      logging.
      >
      If you want to switch to circular logging, you MUST to set LOGSECOND to
      a value >= 0, in addition to turning LOGARCHMETH1/2 to OFF.
      Aye. Thank you much. It works now.<g>
      nat

      Comment

      Working...