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
Shrink transaction log file in Sql Server
WhatsApp
Manish Dwivedi
14y
12.6
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
Introducing Microsoft SQL Server 2016
Read by 11k people
Download Now!
Learn
View all
Membership not found