Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Posts
    1

    Unanswered: Log File too big

    The size of the .MDF is 175,000 Kb while that of the .LDF is 2,377,000 Kb. What should I do to truncate the Log File? Pls advise.

  2. #2
    Join Date
    Jun 2003
    Posts
    269

    Thumbs up

    before executing this code read BOL, dbcc shrinkfile
    Code:
    backup DATABASE yourdatabasename to disk='c:\yourdatabasename .bak'
    go
    dbcc shrinkfile (yourdatabase_log,size,truncateonly)
    go
    --to get log file name------
    select * from sysfiles
    Last edited by mallier; 12-12-05 at 04:39.
    I love cursor,though I never use it.Cos' I dont want to misuse it.
    ----------------------------------------------

    ----cheers
    ----http://mallier.blogspot.com

  3. #3
    Join Date
    Dec 2004
    Posts
    1
    1.Please change the db options to Simple recovery Model.
    2.Use the DBCC Shrinkfile ('FileNAme','SizeinMB) e.g DBCC Shrinkfile ('Myfile',100)

    Thanks

Posting Permissions

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