Many times transaction log space gets full on SQL servers. To truncate transaction log we can use below script:
DECLARE @Query NVARCHAR(1000) SET @Query = N'DBCC SHRINKFILE(2,0,''TRUNCATEONLY'')' EXEC YourServerName.YourDBName.dbo.sp_executesql @statement = @QueryDBCC is database console command, 2 in SHRINKFILE signifies log file.
No comments:
Post a Comment