truncate data in log

  • hi all

    i have sql server 2005 installed for share point. it has continuous transactions.

    log file reached up to 130Gb. i want to shrink the log file. i know two steps for normal sqlserver.

    1)shrink the file

    2)detach/attach method

    can any one guide me which one is better to go for the share point sqlserver 2005?

  • Look here

  • Hi ,

    You can take log backup and shrink the files.

    How you connecting to the database?

  • i use to connect with SSMS

  • Check whether if the database is in full recovery model.

    Then take log backup.

    eg: BACKUP LOG [DBA] TO DISK = N'C:\DBA_log_090909.trn'

    Take new query window and select particular database for shrinking

    Issue "checkpoint" many times in that database

    Shrink the log file.

    eg: dbcc shrinkfile (DBA__log,20)

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

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