Categories
How do I empty my MS SQL database log file?
Query to empty the log file for an MS SQL 2005 Database:
DBCC SHRINKFILE(, 1
)BACKUP LOG WITH TRUNCATE_ONLYDBCC
SHRINKFILE(, 1)
Query to empty the log file for an MS SQL 2008 Database:
ALTER DATABASE [ TestDb] SET RECOVERY SIMPLE WITH NO_WAITDBCC
SHRINKFILE(TestDb_Log,1)
ALTER DATABASE [TestDb]SET RECOVERY FULL WITH NO_WAITQuery to
empty the log file for an MS SQL 2012 or higher Database:
ALTER DATABASE [ TestDb] SET RECOVERY SIMPLE WITH NO_WAITDBCC
SHRINKFILE(TestDb_Log, 1)
ALTER DATABASE [TestDb]SET RECOVERY FULL WITH NO_WAITWhat is printed
.
Then you can connect as explained in the following article:
https: //www.mijnhostingpartner.nl/client/knowledgebase/198/Hoe-maak-ik-via-MS-management-studio-verbinding-met-mijn-database.html
When connected to the database you can open a new query window and execute the appropriate query for the MS SQL version you have from the list above.
keywords: is full due to 'LOG_BACKUP mssql database log file empty database log file full