Skip to content

Commit

Permalink
Remove Master DB Hard Coding
Browse files Browse the repository at this point in the history
The vwIndexMetrics_GetScripts was hard coded to point to the Master database.
  • Loading branch information
ericcobb authored Dec 24, 2019
1 parent 3fc27b5 commit 052abf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index-metrics-install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ FROM (SELECT DISTINCT [DatabaseName]
,[DropStatement]
,[DateLastChecked]
,ROW_NUMBER() OVER(PARTITION BY [DatabaseName],[SchemaName],[TableName],[IndexName],[IndexType] ORDER BY DateLastChecked DESC) AS RowNumber
FROM [master].[dbo].[vwIndexMetrics_CurrentActiveIndexMetrics]
FROM [dbo].[vwIndexMetrics_CurrentActiveIndexMetrics]
WHERE CreateStatement IS NOT NULL
AND DateLastChecked > getdate()-5
) q
Expand Down

0 comments on commit 052abf6

Please sign in to comment.