SQL.LOG too big

  • hi guys i noticed that my sql.log is about 20 GB, how can i shrink it?

     

    Also what is this really used for? .. sorry for the dumb question but what is the difference of this log file and the transaction log backup files? i know those are used for recovery.

  • When you backup log, you truncate the inactive transactions. Then, you can shrink log file. If you do not need logs, you can set the database in a SIMPLE mode. To shrink log file, you can either use GUI (right-click the database, then choose shrink database, ...) or script (DBCC SHRINKFILE).

  • Jessica,

    Can you elaborate on what log file you're concerned about?  Is it a database transaction log or a SQL Server error log?

    Greg

    Greg

  • As Greg mentioned it could be anything be more specific...

    ODBC tracing log file name also SQL.log but the path is "C:\DOCUME~1\User~1\LOCALS~1\Temp\SQL.LOG"

    MohammedU
    Microsoft SQL Server MVP

  • If you want to cycle your SQL Server log file - EXEC sp_cycle_errorlog. This has nothing to do with shrinking transaction logs ( ext .ldf ). Stopping and starting SQL Server will also cycle your SQL Server log. Rgds Derek

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

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