Skip to content

Commit fae92b0

Browse files
authored
Update shrink-data-files-incrementally.sql
1 parent 91469e1 commit fae92b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

QueryTemplates/Common Scripts/shrink-data-files-incrementally.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DECLARE @DesiredSize BIGINT = 30000;
66
DECLARE @CurrentSize BIGINT;
77
SELECT @CurrentSize = ROUND(CAST(size AS BIGINT) * 8 / 1024, -3) FROM sys.database_files WHERE name = @FileName
88

9-
WHILE (@CurrentSize > @DesiredSize)
9+
WHILE (@CurrentSize >= @DesiredSize)
1010
BEGIN
1111

1212
SET LOCK_TIMEOUT 5000; -- this supposed to help against heavy blocking (but I don't think it works)

0 commit comments

Comments
 (0)