TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Clear SQL Server Log Details
Ashish Srivastava
May 23
2016
Code
770
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
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