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

Drop BPCheck stored proc if exists #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions BPCheck/Check_BP_Servers.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
USE [msdb]
GO

/*
Replace CREATE PROCEDURE with ALTER PROCEDURE or CREATE OR ALTER PROCEDURE to allow new changes to the SP if the SP is already present.
-- Drop the SP if the SP is already present.
IF OBJECT_ID('dbo.usp_bpcheck') IS NOT NULL
DROP PROCEDURE dbo.usp_bpcheck
GO

/*
Usage examples:
EXEC usp_bpcheck
EXEC usp_bpcheck @allow_xpcmdshell = 0, @ptochecks = 1, @duration = 60
Expand Down