use master
go
IF OBJECTPROPERTY(OBJECT_ID('dbo.sp_b'), 'IsProcedure') = 1
BEGIN
    DROP PROCEDURE dbo.sp_b
    IF OBJECTPROPERTY(OBJECT_ID('dbo.sp_b'), 'IsProcedure') = 1
        PRINT '<<< FAILED DROPPING PROCEDURE dbo.sp_b >>>'
    ELSE
        PRINT '<<< DROPPED PROCEDURE dbo.sp_b >>>'
END
go
create procedure sp_b
as
/********************************************************************************/
/*      Created By :    Umachandar Jayachandran (UC)                            */
/*      Created On :    13 February 1999                                        */
/*      Description:    Just a shorter named SP to use for daily performance    */
/*                      monitoring tasks.                                       */
/********************************************************************************/
/*      Modified On:    10 October 1999                                         */
/*      Description:    Added call to the utility SP from Kalen's website.      */
/********************************************************************************/
/*      Resources  :    https://umachandar.com/resources.htm                 */
/********************************************************************************/
exec sp_who_ex @onlyblocked = 1
exec sp_blockinglocks
go
IF OBJECTPROPERTY(OBJECT_ID('dbo.sp_b'), 'IsProcedure') = 1
BEGIN
    GRANT EXECUTE ON dbo.sp_b To Public
    PRINT '<<< CREATED PROCEDURE dbo.sp_b >>>'
END
ELSE
    PRINT '<<< FAILED CREATING PROCEDURE dbo.sp_b >>>'
go
This page was last updated on May 01, 2006 04:28 PM.