Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
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
817
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
SQL Server
Log Details
Up Next
Clear SQL Server Log Details