File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 413413 NULL
414414 )
415415
416+ IF OBJECT_ID (' tempdb..#ErrorLog' ) IS NOT NULL
417+ DROP TABLE #ErrorLog;
418+ CREATE TABLE #ErrorLog
419+ (
420+ LogDate DATETIME ,
421+ ProcessInfo NVARCHAR (20 ) ,
422+ [Text] NVARCHAR (1000 )
423+ );
424+
416425 /* Used for the default trace checks. */
417426 DECLARE @TracePath NVARCHAR (256 );
418427 SELECT @TracePath= CAST (value as NVARCHAR (256 ))
@@ -5179,6 +5188,35 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
51795188 [dopm].[locked_page_allocations_kb] > 0 ;
51805189 END ;
51815190
5191+ /*
5192+ Starting with SQL Server 2014 SP2, Instant File Initialization
5193+ is logged in the SQL Server Error Log.
5194+ */
5195+ IF NOT EXISTS ( SELECT 1
5196+ FROM #SkipChecks
5197+ WHERE DatabaseName IS NULL AND CheckID = 184 )
5198+ AND (@ProductVersionMajor >= 13 ) OR (@ProductVersionMajor = 12 AND @ProductVersionMinor >= 5000 )
5199+ BEGIN
5200+ INSERT INTO #ErrorLog
5201+ EXEC sys .xp_readerrorlog 0 , 1 , N ' Database Instant File Initialization: enabled' ;
5202+
5203+ IF @@ROWCOUNT > 0
5204+ INSERT INTO #BlitzResults
5205+ ( CheckID ,
5206+ [Priority] ,
5207+ FindingsGroup ,
5208+ Finding ,
5209+ URL ,
5210+ Details
5211+ )
5212+ SELECT
5213+ 184 AS [CheckID] ,
5214+ 250 AS [Priority] ,
5215+ ' Server Info' AS [FindingsGroup] ,
5216+ ' Instant File Initialization Enabled' AS [Finding] ,
5217+ ' ' AS [URL] ,
5218+ ' The service account has the Perform Volume Maintenance Tasks permission.'
5219+ END ;
51825220
51835221 IF NOT EXISTS ( SELECT 1
51845222 FROM #SkipChecks
You can’t perform that action at this time.
0 commit comments