Tutorials Forums
     Tutorials Videos
        Sign Up Now For FREE
Welcome, Guest
Username Password: Remember me

Shrink SQL Server database log files
(1 viewing) (1) Guest
SQL SERVER HELP, SQL SERVER TUTORIALS, SQL SERVER PROGRAMMING, SQL SERVER CODE


SQL Server is a relational DMBS written for the Windows platform by Microsoft. SQL Server is a high-end and high-performance solution, for applications that interact with a database. Its use has been increasing because of the number of web applications that feature a data base back end.
  • Page:
  • 1

TOPIC: Shrink SQL Server database log files

Shrink SQL Server database log files 08 Feb 2010 22:06 #268

Shrink SQL Server database log files?

Database Logs should be truncated when ever you perform a full backup of the database. You can also manually truncate them as following.
DECLARE @strDatabaseName nvarchar(255)SET @strDatabaseName = 'YourDatabaseName' BACKUP LOG @strDatabaseName WITH TRUNCATE_ONLY DBCC SHRINKDATABASE (@strDatabaseName, 0)


I was tested in SQL Server 2005 & it's working. But I found it somewhere. Also tested in SQL 2008 & it's working too.
  • David
  • OFFLINE
  • CE Newbi e
  • Posts: 35
  • Karma: 21
CodersEngine
  • Page:
  • 1
Time to create page: 0.32 seconds