1
0
mirror of https://github.com/alex-bochkov/ssms-addin.git synced 2025-11-23 22:04:53 +02:00

Update shrink-data-files-incrementally.sql

This commit is contained in:
Alex Bochkov
2019-06-11 13:43:33 -07:00
committed by GitHub
parent 4c08dcd731
commit 623cbaae59

View File

@@ -4,7 +4,7 @@ DECLARE @FileName VARCHAR(100) = 'Ff_ppbAdOrderAccumulatedDeliveredClickStats20
DECLARE @DesiredSize INT = 30000;
DECLARE @CurrentSize INT;
SELECT @CurrentSize = size * 8 / 1024 FROM sys.database_files WHERE name = @FileName
SELECT @CurrentSize = ROUND(size * 8 / 1024, -3) FROM sys.database_files WHERE name = @FileName
WHILE (@CurrentSize > @DesiredSize)
BEGIN