1
0
mirror of https://github.com/alex-bochkov/ssms-addin.git synced 2025-11-29 22:08:12 +02:00
Files
ssms-addin/QueryTemplates/Common Scripts/grow-log-file.sql

13 lines
252 B
MySQL
Raw Normal View History

2018-08-08 18:59:26 -07:00
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