Reputation: 31
in SQL Server 2008 is there any way to disable transaction log or clear log file?
When I execute one query in my project (very large in terms of transaction) a that time this log file's size will goring to increase (20 to 30 GB).
now i want to disable it any other option for it
Upvotes: 2
Views: 88
Reputation: 12575
you can use this T-SQL To clear Log file.
BACKUP log [CustomerServiceSystem] with truncate_only
go
DBCC SHRINKDATABASE ([CustomerServiceSystem], 10, TRUNCATEONLY)
go
and for Disable Log you can use this
ALTER DATABASE MyDB SET RECOVERY SIMPLE;
refer to this link
Upvotes: 1