Log File in sql server 2008

  • Hi All,

    We are using sql server 2008 ,the log file of the one database is very large.

    The size is more than data file of database.

    The size of the log file is not reducing even I took the transactonal log backup.

    I am sure the the log file has no active transactions, because when i tried this below command it is returning LogBackup.

    select log_reuse_wait_desc from sys.databases where name=' databasename'.

    Please suggest me on this.

    Thanks

    venkat

  • hi,

    Use DBCC SHRINK command....

    http://support.microsoft.com/kb/873235

    regards,

    Sasidhar Chowdary

    Recognition is the greatest motivator.

  • First verify the free space in the logfile. Then, if the logfile is largely made up of free space - you can shrink it. Use DBCC Shrinkfile.

    Second, verify that you have your transaction logs scheduled to run regularly. Verify that those are completing successfully.

    Third, find out what is causing your log file to grow so large. You can read this article to help with that - http://qa.sqlservercentral.com/articles/Log+growth/69476/

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • venkatreddy.bashi (4/15/2010)


    The size of the log file is not reducing even I took the transactonal log backup.

    I am sure the the log file has no active transactions, because when i tried this below command it is returning LogBackup.

    select log_reuse_wait_desc from sys.databases where name=' databasename'.

    Please suggest me on this.

    1) Just taking tlog backup is not enough. You need to shrink also.

    2) Above query does not tell whether there is any active tran.

    You need to run DBCC OPENTRAN

  • select name,recovery_model_desc,log_reuse_wait_dec from sysdatabases

    log_reuse_wait_dec gives the status of perticular log:ACTIVE_transaction,logback_up,nothing ...etc

    which database u have to find the status of logback_up immediately u take the log backup.

    then u go for shrink...

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

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