Huge log file

  • Hello,

    I am working on a SQL Server database that supports Macola application and here is what I found in one of the databases for my client:

    Data file is 142 MB where as the log file is 20000 MB, I think this may potentially be a problem so I want to make sure data is written from log to disk and log file is shrunk to manageble size. Please advise.

    Thanks a lot


    Raghu M Nandan

  • Hi,

    Just run the below command to reduce the log file size, Before running, Replace Northwind_log by ur logical filename.

    DBCC SHRINKFILE (Northwind_log, 10)

    go

    BACKUP LOG Northwind_log WITH TRUNCATE_ONLY

    After running the above command, Take complete backup of the database.

    Thanks

    Srini


    Srini

  • This is a symptom of either the wrong backup strategy being in place, no backup strategy in place or the wrong 'failure recovery' model specified for the DB.  The solution proposed is temporary.  Investigate the needs of the DB and then implement the proper recovery model and the matchin DB backup strategy to make this permanent.

  • Thanks a lot guys,

    Srini, your solution worked and I could reduce the transaction log...

    Andrew, I will take a look into this further and hopefully fix so that this does not happen again.

    Thanks again guys

    Raghu


    Raghu M Nandan

Viewing 4 posts - 1 through 3 (of 3 total)

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