Skip to content

#2010 sp_Blitz paused online index operations #2011

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

Merged
merged 1 commit into from
Mar 24, 2019
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
5 changes: 3 additions & 2 deletions Documentation/sp_Blitz Checks by Priority.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav

If you want to change anything about a check - the priority, finding, URL, or ID - open a Github issue first. The relevant scripts have to be updated too.

CURRENT HIGH CHECKID: 224.
If you want to add a new one, start at 225.
CURRENT HIGH CHECKID: 225.
If you want to add a new one, start at 226.

| Priority | FindingsGroup | Finding | URL | CheckID |
|----------|-----------------------------|---------------------------------------------------------|------------------------------------------------------------------------|----------|
Expand Down Expand Up @@ -242,6 +242,7 @@ If you want to add a new one, start at 225.
| 200 | Performance | User-Created Statistics In Place | https://www.BrentOzar.com/go/userstats | 122 |
| 200 | Performance | SSAS/SSIS/SSRS Installed | https://www.BrentOzar.com/go/services | 224 |
| 200 | Reliability | Extended Stored Procedures in Master | https://www.BrentOzar.com/go/clr | 105 |
| 200 | Reliability | Resumable Index Operation Paused | https://www.BrentOzar.com/go/resumable | 225 |
| 200 | Surface Area | Endpoints Configured | https://www.BrentOzar.com/go/endpoints/ | 9 |
| 210 | Non-Default Database Config | ANSI NULL Default Enabled | https://www.BrentOzar.com/go/dbdefaults | 135 |
| 210 | Non-Default Database Config | Auto Create Stats Incremental Enabled | https://www.BrentOzar.com/go/dbdefaults | 134 |
Expand Down
31 changes: 31 additions & 0 deletions sp_Blitz.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6115,6 +6115,37 @@ IF @ProductVersionMajor >= 10
HAVING COUNT(1) > 0;';
END; --of Check 218.

/* Check 225 - Reliability - Resumable Index Operation Paused */
IF NOT EXISTS (
SELECT 1
FROM #SkipChecks
WHERE DatabaseName IS NULL
AND CheckID = 225
)
AND EXISTS (SELECT * FROM sys.all_objects WHERE name = 'index_resumable_operations')
BEGIN
IF @Debug IN (1,2)
BEGIN
RAISERROR ('Running CheckId [%d].',0,1,218) WITH NOWAIT;
END

EXECUTE sp_MSforeachdb 'USE [?];
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
INSERT INTO #BlitzResults (CheckID, DatabaseName, Priority, FindingsGroup, Finding, URL, Details)
SELECT 225 AS CheckID
,''?'' AS DatabaseName
,200 AS Priority
,''Reliability'' AS FindingsGroup
,''Resumable Index Operation Paused'' AS Finding
,''https://BrentOzar.com/go/resumable'' AS URL
,iro.state_desc + N'' since '' + CONVERT(NVARCHAR(50), last_pause_time, 120) + '', ''
+ CAST(iro.percent_complete AS NVARCHAR(20)) + ''% complete: ''
+ CAST(iro.sql_text AS NVARCHAR(1000)) AS Details
FROM sys.index_resumable_operations iro
JOIN sys.objects o ON iro.[object_id] = o.[object_id]
WHERE iro.state <> 0;';
END; --of Check 225.

--/* Check 220 - Statistics Without Histograms */
--IF NOT EXISTS (
-- SELECT 1
Expand Down