Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rowset for missing msi/msp files #336 #337

Merged
merged 5 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NexusReports/AnalysisSummary_C.rdl
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ Fields!Report.Value = "Missing Indexes", "Missing Indexes_C",
Fields!Report.Value = "Spinlock Stats", "Spinlock Stats_C",
Fields!Report.Value = "Loaded Modules", "Loaded Modules_C",
Fields!Report.Value = "AlwaysOn Report", "AlwaysOn_AGBasics_C",
Fields!Report.Value = "Missing MSI or MSPs", "Missing_MSIs_or_MSPs_C",
Fields!Report.Value = "data imported with older SQLNexus version", Nothing,
Fields!Report.Value = "", Nothing)</ReportName>
</Drillthrough>
Expand All @@ -699,6 +700,7 @@ Fields!Report.Value = "", Nothing)</ReportName>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
</TablixCells>
Expand Down
Binary file added NexusReports/AnalysisSummary_C.rdl.data
Binary file not shown.
572 changes: 572 additions & 0 deletions NexusReports/Missing_MSIs_or_MSPs_C.rdl

Large diffs are not rendered by default.

Binary file added NexusReports/Missing_MSIs_or_MSPs_C.rdl.data
Binary file not shown.
1 change: 1 addition & 0 deletions NexusReports/NexusReports.rptproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<Report Include="Memory Brokers_C.rdl" />
<Report Include="Memory Clerks_C.rdl" />
<Report Include="Missing Indexes_C.rdl" />
<Report Include="Missing_MSIs_or_MSPs_C.rdl" />
<Report Include="Other Waits_C.rdl" />
<Report Include="PAL_C.rdl" />
<Report Include="PAL_sub_C.rdl" />
Expand Down
19 changes: 19 additions & 0 deletions NexusReports/SQL Perf Main.rdl
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,25 @@ VALUES
('Filter_Drivers_C', 'Filter Drivers Report', 'Filter Drivers Report', 1 | 2 | 4 | 8, 'Common',
'dbo.tbl_fltmc_filters', 2000, 'SQL Base Collector', 1, 2000);

-- Missing MSI/MSPs
INSERT INTO @tbl_reports
(
ReportName,
ReportDisplayName,
ReportDescription,
VersionApplied,
Category,
ValidationObject,
SeqNo,
DataCollection,
Manditory,
CategorySeq
)
VALUES
('Missing_MSIs_or_MSPs_C', 'Missing MSI or MSPs', 'Shows missing MSI/MSP package', 1 | 2 | 4 | 8, 'Setup',
'dbo.tbl_setup_missing_msi_msp_packages', 2000, 'Setup', 1, 2022);



--Azure
INSERT INTO @tbl_reports
Expand Down
10 changes: 10 additions & 0 deletions RowsetImportEngine/TextRowsets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4348,6 +4348,16 @@
<Column name="Value" type="RowsetImportEngine.VarCharColumn" length="4000" />
</KnownColumns>
</Rowset>

<Rowset name="tbl_setup_missing_msi_msp_packages" enabled="true" identifier="-- missing or corrupt installer msi or msp packages --" type="RowsetImportEngine.TextRowset">
<KnownColumns>
<Column name="ProductName" type="RowsetImportEngine.NVarCharColumn" length="65" />
<Column name="ExpectedInstallerCacheFile" type="RowsetImportEngine.NVarCharColumn" length="52" />
<Column name="FileIsPresentInCacheButPossiblyCorrupt" type="RowsetImportEngine.NVarCharColumn" length="52" />
<Column name="ProductVersion" type="RowsetImportEngine.VarCharColumn" length="14" />
<Column name="PackageName" type="RowsetImportEngine.NVarCharColumn" length="32" />
</KnownColumns>
</Rowset>
</KnownRowsets>
</TextImport>

Expand Down
143 changes: 101 additions & 42 deletions sqlnexus/PerfStatsAnalysis.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4559,6 +4559,28 @@ VALUES
'Common Criteria Compliance Enabled', 'Enabling this can cause performance issues', '',
'https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/common-criteria-compliance-enabled-server-configuration-option?view=sql-server-ver16',
' ', 1, 100, 0, 'Server Configuration');
INSERT INTO dbo.tbl_AnalysisSummary
(
SolutionSourceId,
Category,
Type,
TypeDesc,
Name,
FriendlyName,
Description,
InternalUrl,
ExternalUrl,
Author,
Priority,
SeqNum,
Status,
Report
)
VALUES
('E57F6CE6-EFCC-48B0-B82A-373ED6DF3434', 'Setup', 'W', 'Warning', 'usp_MissingMSI_MSP',
'Missing installation MSI/MSPs on the system', 'These can cause various CU/SP upgrade error messages or unexpected behaviors', '',
'https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/install/windows/restore-missing-windows-installer-cache-files',
' ', 1, 100, 0, 'Missing MSI or MSPs');



Expand Down Expand Up @@ -5551,7 +5573,7 @@ BEGIN
END;
GO

CREATE PROCEDURE usp_DBMEndPointState
CREATE PROCEDURE dbo.usp_DBMEndPointState
AS
BEGIN
DECLARE @hadr_endpoint VARCHAR(128),
Expand Down Expand Up @@ -5583,7 +5605,7 @@ BEGIN
END;
GO

CREATE PROCEDURE usp_HugeGrant
CREATE PROCEDURE dbo.usp_HugeGrant
AS
BEGIN
DECLARE @cnt INT,
Expand Down Expand Up @@ -5620,7 +5642,7 @@ END;

GO

CREATE PROCEDURE Optimizer_Memory_Leak
CREATE PROCEDURE dbo.Optimizer_Memory_Leak
AS
BEGIN
DECLARE @SQLVersion VARCHAR(100);
Expand Down Expand Up @@ -7117,7 +7139,42 @@ BEGIN
BEGIN
UPDATE dbo.tbl_AnalysisSummary
SET [Status] = 1
WHERE Name = 'usp_CCC_Enabled';
WHERE [Name] = OBJECT_NAME(@@PROCID);
END;
END;
END;
GO

CREATE PROCEDURE [dbo].[usp_MissingMSI_MSP]
AS
BEGIN
IF (
OBJECT_ID('tbl_setup_missing_msi_msp_packages') IS NOT NULL
AND (OBJECT_ID('tbl_AnalysisSummary') IS NOT NULL)
)
BEGIN
IF (
(
SELECT COUNT(*)
FROM [dbo].[tbl_setup_missing_msi_msp_packages]
) > 0
)
BEGIN

DECLARE @InstCacheFiles VARCHAR(8000), @InstCacheCorruptFiles VARCHAR(8000)
SELECT @InstCacheFiles = COALESCE(@InstCacheFiles + CHAR(13) + CHAR(10) , '') + ISNULL([ExpectedInstallerCacheFile], ''),
@InstCacheCorruptFiles = COALESCE(@InstCacheCorruptFiles + CHAR(13) + CHAR(10) , '') + ISNULL([FileIsPresentInCacheButPossiblyCorrupt], '')
FROM dbo.tbl_setup_missing_msi_msp_packages


UPDATE dbo.tbl_AnalysisSummary
SET [Status] = 1,
[Description] = 'The following SQL Server MSI/MSPs are missing from the system. These can cause various CU or SP upgrade issues or unexpected behaviors: '
+ CHAR(13) + CHAR(10) + @InstCacheFiles + CHAR(13) + CHAR(10) +
'And the following SQL Server MSI/MSPs are possibly corrupt: '
+ @InstCacheCorruptFiles
+ CHAR(13) + CHAR(10) + 'Be sure to use the linked article to resolve the missing MSI/MSP issues.'
WHERE [Name] = OBJECT_NAME(@@PROCID);
END;
END;
END;
Expand All @@ -7129,89 +7186,91 @@ GO
firing rules
********************************************************/

EXEC usp_AttendtionCausedBlocking;
EXEC dbo.usp_AttendtionCausedBlocking;
GO
EXEC usp_PerfScriptsRunningLong;
EXEC dbo.usp_PerfScriptsRunningLong;
GO
EXEC usp_LongAutoUpdateStats;
EXEC dbo.usp_LongAutoUpdateStats;
GO
EXEC usp_HighStmtCount;
EXEC dbo.usp_HighStmtCount;
GO
EXEC usp_RG_Idle;
EXEC dbo.usp_RG_Idle;
GO
EXEC usp_HighCompile;
EXEC dbo.usp_HighCompile;
GO
EXEC usp_HighCacheCount;
EXEC dbo.usp_HighCacheCount;
GO
EXEC proc_PowerPlan;
EXEC dbo.proc_PowerPlan;
GO
EXEC proc_CheckTraceFlags;
EXEC dbo.proc_CheckTraceFlags;
GO
EXEC proc_AutoStats;
EXEC dbo.proc_AutoStats;
GO
EXEC proc_ConfigAlert;
EXEC dbo.proc_ConfigAlert;
GO
EXEC usp_ExcessiveLockXevent;
EXEC dbo.usp_ExcessiveLockXevent;
GO
EXEC usp_McAFee_Intrusion;
EXEC dbo.usp_McAFee_Intrusion;
GO
EXEC usp_BatchSort;
EXEC dbo.usp_BatchSort;
GO
EXEC dbo.usp_OptimizerTimeout;
GO
EXEC usp_SmallSampledStats;
EXEC dbo.usp_SmallSampledStats;
GO
EXEC usp_DisabledIndex;
EXEC dbo.usp_DisabledIndex;
GO
EXEC usp_AccessCheck;
EXEC dbo.usp_AccessCheck;
GO
EXEC usp_RedoThreadBlocked;
EXEC dbo.usp_RedoThreadBlocked;
GO
EXEC usp_VirtualBytesLeak;
EXEC dbo.usp_VirtualBytesLeak;
GO
EXEC usp_ChangeTableCauseHighCPU;
EXEC dbo.usp_ChangeTableCauseHighCPU;
GO
EXEC dbo.usp_DeadlockTraceFlag;
GO
EXEC usp_Expensive_TraceEvts_Used;
EXEC dbo.usp_Expensive_TraceEvts_Used;
GO
EXEC usp_Expensive_XEvts_Used;
GO
EXEC usp_ExcessiveTrace_Warning;
EXEC dbo.usp_ExcessiveTrace_Warning;
GO
EXEC OracleLinkedServerIssue;
EXEC dbo.OracleLinkedServerIssue;
GO
EXEC XEventcrash;
EXEC dbo.XEventcrash;
GO
EXEC usp_Non_SQL_CPU_consumption;
EXEC dbo.usp_Non_SQL_CPU_consumption;
GO
EXEC usp_KernelHighCPUconsumption;
EXEC dbo.usp_KernelHighCPUconsumption;
GO
EXEC usp_SQLHighCPUconsumption;
EXEC dbo.usp_SQLHighCPUconsumption;
GO
EXEC StaleStatswarning2008;
EXEC dbo.StaleStatswarning2008;
GO
EXEC dbo.usp_IOAnalysis;
GO
EXEC usp_WarnmissingIndex;
EXEC dbo.usp_WarnmissingIndex;
GO
EXEC Optimizer_Memory_Leak;
EXEC dbo.Optimizer_Memory_Leak;
GO
EXEC dbo.usp_HugeGrant;
GO
EXEC usp_HighRecompiles;
EXEC dbo.usp_HighRecompiles;
GO
EXEC dbo.usp_oldce;
GO
EXEC usp_oldce;
EXEC dbo.usp_CalvsCore;
GO
EXEC usp_CalvsCore;
EXEC dbo.usp_Spinlock_HighCPU;
GO
EXEC usp_Spinlock_HighCPU;
EXEC dbo.usp_NonMS_LoadedModules;
GO
EXEC usp_NonMS_LoadedModules;
EXEC dbo.usp_DBMEndPointState;
GO
EXEC usp_DBMEndPointState;
EXEC dbo.usp_AGHealthState;
GO
EXEC usp_AGHealthState;
EXEC dbo.usp_CCC_Enabled;
GO
EXEC usp_CCC_Enabled;
EXEC dbo.usp_MissingMSI_MSP
/******END of script***/
2 changes: 2 additions & 0 deletions sqlnexus/Reports/AnalysisSummary_C.rdlC
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ Fields!Report.Value = "Missing Indexes", "Missing Indexes_C",
Fields!Report.Value = "Spinlock Stats", "Spinlock Stats_C",
Fields!Report.Value = "Loaded Modules", "Loaded Modules_C",
Fields!Report.Value = "AlwaysOn Report", "AlwaysOn_AGBasics_C",
Fields!Report.Value = "Missing MSI or MSPs", "Missing_MSIs_or_MSPs_C",
Fields!Report.Value = "data imported with older SQLNexus version", Nothing,
Fields!Report.Value = "", Nothing)</ReportName>
</Drillthrough>
Expand All @@ -699,6 +700,7 @@ Fields!Report.Value = "", Nothing)</ReportName>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
</TablixCells>
Expand Down
Loading