Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2002
    Posts
    165

    Unanswered: Is backup log truncate inactive part of logs?

    Also,what is steps needed for online backup?
    backup database and then
    backup logs
    or reverse?
    Thanks a lot,Zvonimir

  2. #2
    Join Date
    Oct 2001
    Location
    Naples, FL
    Posts
    273
    To answer your subject line, the backup log command does nothing with the INACTIVE part of the log. It only truncates the active part, it does not shrink the logfile if that is what you are asking. A full backup does not truncate or shrink the log file so it depends on what your needs are in regards to doing a log backup before or after a full backup.

    HTH
    ---------------
    Ray Higdon MCSE, MCDBA, CCNA

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    rhigdon,

    The active portion of the log can never be truncated. The active part represents transactions in progress. It is the inactive part that is truncated.

    blindman

  4. #4
    Join Date
    Oct 2001
    Location
    Naples, FL
    Posts
    273
    "Active portion" may not have been the right term to use, you are right in saying Active TRANSACTIONS are transactions that have not been committed. So, not sure if we can call any PORTION of the log active, and would we call the remainder INACTIVE? Meaning the empty space of the footprint plus the transactions not checkpointed?

    My definition of the active portion of the tran log in the context of this thread was the transactions that have not been checkpointed and sent to the database yet but were still in the tran log (and of course would show up in any query). Wheras (again, my definition) the inactive portion was the percentage not being used in the tran log.

    Soo, not sure if active or inactive are the right terms but what I meant to relay was that if my tran log is 50mb with 20mb used, a backup or truncate log command would clear that 20mb but still leave the footprint or shell of 50mb until it was shrunk or grew more.

    Thanks for pointing that out
    ---------------
    Ray Higdon MCSE, MCDBA, CCNA

  5. #5
    Join Date
    Oct 2001
    Location
    Naples, FL
    Posts
    273
    You are also right that active trans can not be truncated , forgot to add that.
    ---------------
    Ray Higdon MCSE, MCDBA, CCNA

  6. #6
    Join Date
    Jan 2002
    Posts
    165
    Thanks for Your answers.I believe i wasn't exact enough.
    My experience with DB2 and Oracle tell me that for RDBMS common feature is "online backup",that is during backup my users can work with database.But,for recovery of database,only database online backup isn't enough,because of uncommited transactions in "active part of logs".So,for online backup I MUST do BACKUP LOG.
    My qestions are:
    1) How i force database to do online backup?Is this any reserved word for online backup telling "it is online backup" or SQL by "status of database" recognize online ( or offline) backup?

    2) What is better:
    a) BACKUP DATABASE
    BACKUP LOG (with truncate,not shrink)
    or
    b) BACKUP LOG
    BACKUP DATABASE?

    Thanks a lot for Your answers,Zvonimir

Posting Permissions

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