Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Shrink transaction log file in Sql Server
WhatsApp
Manish Dwivedi
14y
12.5
k
0
1
25
Blog
Command are as follows:
For Sql Server 2005
BACKUP LOG
[DBNAME]
WITH TRUNCATE_ONLY
DBCC SHRINKFILE(
[DBNAME]
_log)
For Sql Server 2008
ALTER
DATABASE
[DBName]
SET
RECOVERY
SIMPLE
;
GO
-- Shrink the truncated log file to 1 MB.
DBCC
SHRINKFILE
(
DBName_log
,
1
);
GO
-- Reset the database recovery model.
ALTER
DATABASE
[DBName]
SET
RECOVERY
FULL
;
Shrink transaction log file in Sql Server
Up Next
How To Shrink The Size Of A Transaction Log (.LDF) In SQL Using SQL Server Management Studio 2016
Ebook Download
View all
Basics of SQL Server
Read by 1.5k people
Download Now!
Learn
View all
Membership not found