Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    266

    Unanswered: compacting LOG file

    how can you compact .log file ?
    they can be > 20 gigas ! ....
    can you delete it ?

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    do you mean the log files that the server itself writes? Those have no file extension normally, usuall called something like ERRORLOG. when the server restarts it renames it to ERRORLOG.1 and starts a new one. I would be very surprised if you have a 20gb one though. that's pretty large. maybe you have a lot of failed login attempts (which are logged as I recall).

    Or perhaps you mean a ldf file? These are transaction log files for a database - it's common for these to get large. You can shrink the size of the ldf using DBCC SHRINKFILE. You should not delete an ldf file unless you want to delete the database it's associated with.

    Note that if you care about recoverability, you should be making regular backups of both your database and transaction log.

  3. #3
    Join Date
    Dec 2005
    Posts
    266
    thank you Jezemine

    yes of course I mean transaction log files
    DBCC SHRINKFILE ? i musyt look how to use it ? do you run it as a stored procedure ?

    EXECUTE DBCC SHRINKFILE

    thank you for helping

  4. #4
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    it's not a sproc.

    read about DBCC SHRINKFILE in bol.

Posting Permissions

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