You've already forked ssms-addin
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user