Howto shrink / truncate SQL transaction log file in SQL Server 2005

USE <databasename>

GO

DBCC SHRINKFILE(‘<logfilename-logical name>’, 1)

BACKUP LOG <databasename> WITH TRUNCATE_ONLY

DBCC SHRINKFILE(‘<logfilename-logical name>’, 1)

GO

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

You may also like...

2 Responses

  1. Ulrich says:

    Hej Kenneth,

    Hvordan får man så lige Ahsay til at gøre dette efter hver fulde backup?

  2. admin says:

    Skulle den vist gøre automatisk, bruger ikke ahsay længere, men prøv at spørge i deres forum.

Leave a Reply

Your email address will not be published. Required fields are marked *