C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Clear SQL Server Log Details
WhatsApp
Ashish Srivastava
May 23
2016
832
0
0
USE Databasename;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER
DATABASE
dblt
SET
RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (Databasename_LOG, 1);
---Databasename_log log file name
GO
-- Reset the database recovery model.
ALTER
DATABASE
Databasename
SET
RECOVERY
FULL
;
GO
sp_helpdb Databasename
go
Log Details
SQL Server
Up Next
Clear SQL Server Log Details