- Connect to Database use Microsoft SQL Server Management Studio
- Start a New Query
- Copy and Paste the following SQL Script into the New Query
- Shrink Database Log SQLScript
DECLARE @dbName VARCHAR(50) DECLARE @logName VARCHAR(100) SELECT @dbName = DB_NAME() SELECT @logName = name FROM SYS.database_files WHERE type = 1 EXECUTE('ALTER DATABASE[' + @dbName + '] SET RECOVERY SIMPLE') DBCC SHRINKFILE (@logName, 1); EXECUTE('ALTER DATABASE[' + @dbName + '] SET RECOVERY FULL')
- Execute the Query
Please refer How to Connect to Database use Microsoft SQL Server Management Studio
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article