Regarding LDF file.

  • shnex (3/19/2009)


    If I make log backups ...the log space will be reusable

    Yes, the VLF's are marked as truncated to make them reusable.

    , but in order to use the log information I will have to restore the log backups I think...am I wrong?

    Sorry, I did not get this

  • As I sad I haven't worked with logs, so if I make a backup to a log....is it the same as working with a database....I will have to restore it, and only this way I will have acces to the log information.

    I said that shrinking seems better because the information from the log remains there, and I will not have to restore the log backup and to loose the last recorded information

    I accept that some things I say might be wrong , so ...corect me please:-)

  • shnex (3/19/2009)


    only this way I will have acces to the log information.

    Why do you want to access the log information?

    I said that shrinking seems better because the information from the log remains there

    If you never remove info from the log, it will grow until it fills the hard drive. Once it does that, the database will become unavailable. I don't understand your comment about shrink, if the log has xMB of information in it, you cannot shrink the file below X MB without removing some of those log records

    , and I will not have to restore the log backup and to loose the last recorded information

    The only log records that SQL will allow to be removed from the log are ones that are no longer needed for rollbacks, database consistency or replication (where applicable). The nonly time you need that info is when you are restoring a database to the point of failure (or the point where a table was dropped)

    From what I'm seeing, you don't understand what the log is or what it does. Correct?

    Try reading this, as well as the sections in Books Online about the transaction log:

    http://technet.microsoft.com/en-us/magazine/2009.02.logging.aspx - "Understanding how logging and recovery work inside SQL Server" by Paul Randal

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi Shnex,

    shnex (3/19/2009)


    so if I make a backup to a log....is it the same as working with a database....I will have to restore it, and only this way I will have acces to the log information.

    You don't backup to a log, you backup a log, Log is like a file which records transactions that are run against the database and which used for recovery purposes, the information contained in the log file is typically for the server.

    I said that shrinking seems better because the information from the log remains there, and I will not have to restore the log backup and to loose the last recorded information

    I accept that some things I say might be wrong , so ...corect me please:-)

    I still did not get this question. may be i am missing something 🙁

  • I'll read Gail's article and see some things because my lack of knowledge is making me ask some silly questions. I think I didn't understand some things...so I will read a little more and then , eventualy come with some questions. Thanks and sorry:-D

    P.S. : It's me, you're not missing anything:-D

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply