1
0
mirror of https://github.com/alex-bochkov/ssms-addin.git synced 2026-06-15 16:57:06 +02:00

Update shrink-data-files-incrementally.sql

This commit is contained in:
Alex Bochkov
2020-04-19 14:25:36 -07:00
committed by GitHub
parent 91469e1aa7
commit fae92b038a
@@ -6,7 +6,7 @@ DECLARE @DesiredSize BIGINT = 30000;
DECLARE @CurrentSize BIGINT;
SELECT @CurrentSize = ROUND(CAST(size AS BIGINT) * 8 / 1024, -3) FROM sys.database_files WHERE name = @FileName
WHILE (@CurrentSize > @DesiredSize)
WHILE (@CurrentSize >= @DesiredSize)
BEGIN
SET LOCK_TIMEOUT 5000; -- this supposed to help against heavy blocking (but I don't think it works)