You've already forked ssms-addin
mirror of
https://github.com/alex-bochkov/ssms-addin.git
synced 2025-11-23 22:04:53 +02:00
Create grow-log-file.sql
This commit is contained in:
12
QueryTemplates/Common Scripts/grow-log-file.sql
Normal file
12
QueryTemplates/Common Scripts/grow-log-file.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
DECLARE @INT INT = 2, @Cmd VARCHAR(max);
|
||||
--target size 100GB
|
||||
WHILE @INT <= 100
|
||||
BEGIN
|
||||
|
||||
|
||||
SET @Cmd = 'ALTER DATABASE [db] MODIFY FILE ( NAME = N''db_log'', SIZE = '+ CAST(@INT * 1024 AS VARCHAR(10))+'MB )';
|
||||
PRINT @Cmd;
|
||||
EXEC(@CMD)
|
||||
SET @Int += 1;
|
||||
|
||||
END
|
||||
Reference in New Issue
Block a user