Skip to content

Commit 9282b02

Browse files
CopilotBrentOzar
andcommitted
Wrap sp_Blitz, sp_BlitzIndex, sp_BlitzAnalysis, sp_DatabaseRestore with BEGIN/END
Co-authored-by: BrentOzar <245462+BrentOzar@users.noreply.github.com>
1 parent 035916c commit 9282b02

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

sp_Blitz.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ALTER PROCEDURE [dbo].[sp_Blitz]
3434
@VersionCheckMode BIT = 0
3535
WITH RECOMPILE
3636
AS
37+
BEGIN
3738
SET NOCOUNT ON;
3839
SET STATISTICS XML OFF;
3940
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
@@ -10819,4 +10820,5 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
1081910820
SET NUMERIC_ROUNDABORT ON;
1082010821

1082110822
SET NOCOUNT OFF;
10823+
END
1082210824
GO

sp_BlitzAnalysis.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ALTER PROCEDURE [dbo].[sp_BlitzAnalysis] (
3434
@Debug BIT = 0
3535
)
3636
AS
37+
BEGIN
3738
SET NOCOUNT ON;
3839
SET STATISTICS XML OFF;
3940

@@ -888,4 +889,5 @@ BEGIN
888889
END
889890

890891

892+
END
891893
GO

sp_BlitzIndex.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ ALTER PROCEDURE dbo.sp_BlitzIndex
5353
@VersionCheckMode BIT = 0
5454
WITH RECOMPILE
5555
AS
56+
BEGIN
5657
SET NOCOUNT ON;
5758
SET STATISTICS XML OFF;
5859
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
@@ -7634,4 +7635,5 @@ BEGIN CATCH
76347635

76357636
RETURN;
76367637
END CATCH;
7638+
END
76377639
GO

sp_DatabaseRestore.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ ALTER PROCEDURE [dbo].[sp_DatabaseRestore]
5353
@RunStoredProcAfterRestore NVARCHAR(260) = NULL,
5454
@EnableBroker BIT = 0
5555
AS
56+
BEGIN
5657
SET NOCOUNT ON;
5758
SET STATISTICS XML OFF;
5859

@@ -1688,4 +1689,5 @@ IF @TestRestore = 1
16881689
IF OBJECT_ID( 'tempdb..#SplitFullBackups' ) IS NOT NULL DROP TABLE #SplitFullBackups;
16891690
IF OBJECT_ID( 'tempdb..#SplitDiffBackups' ) IS NOT NULL DROP TABLE #SplitDiffBackups;
16901691
IF OBJECT_ID( 'tempdb..#SplitLogBackups' ) IS NOT NULL DROP TABLE #SplitLogBackups;
1692+
END
16911693
GO

0 commit comments

Comments
 (0)