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
Update grow-log-file.sql
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
/*
|
||||||
|
Keep in mind that until certain point SQL servers creates 16 VLF for each growth operation.
|
||||||
|
To make sure that VLFs are large from the beginning grow it a LOT first time.
|
||||||
|
*/
|
||||||
|
|
||||||
DECLARE @INT INT = 2, @Cmd VARCHAR(max);
|
DECLARE @INT INT = 2, @Cmd VARCHAR(max);
|
||||||
--target size 100GB
|
--target size 100GB
|
||||||
WHILE @INT <= 100
|
WHILE @INT <= 100
|
||||||
@@ -10,3 +15,21 @@ BEGIN
|
|||||||
SET @Int += 1;
|
SET @Int += 1;
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
select
|
||||||
|
li.VLF,
|
||||||
|
mf.growth,
|
||||||
|
mf.*
|
||||||
|
from sys.master_files mf
|
||||||
|
cross apply (
|
||||||
|
SELECT
|
||||||
|
COUNT(*) AS VLF
|
||||||
|
FROM
|
||||||
|
sys.dm_db_log_info(mf.database_id) li
|
||||||
|
) AS li
|
||||||
|
where
|
||||||
|
mf.type = 1
|
||||||
|
and mf.database_id > 4
|
||||||
|
order by
|
||||||
|
mf.growth
|
||||||
|
|||||||
Reference in New Issue
Block a user