From cf16c208be6d4e8190e679345cf66cf977f4e889 Mon Sep 17 00:00:00 2001 From: Stephane Scherrer <68731510+StefDBA@users.noreply.github.com> Date: Thu, 12 Aug 2021 12:30:17 +0200 Subject: [PATCH] fileid is a smallint based on sys.dm_db_log_info One of my customers has more than 800 files per database and the script crashes with tinyint --- Fixing-VLFs/Fix_VLFs.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fixing-VLFs/Fix_VLFs.sql b/Fixing-VLFs/Fix_VLFs.sql index df9c4e1..49649fc 100644 --- a/Fixing-VLFs/Fix_VLFs.sql +++ b/Fixing-VLFs/Fix_VLFs.sql @@ -35,7 +35,7 @@ FETCH NEXT FROM csr INTO @dbname WHILE (@@FETCH_STATUS <> -1) BEGIN CREATE TABLE #log_info (recoveryunitid int NULL, - fileid tinyint, + fileid smallint, file_size bigint, start_offset bigint, FSeqNo int,