IF EXISTS ( SELECT  *
            FROM    dbo.sysobjects
            WHERE   id = OBJECT_ID(N'[dbo].[Sp_UserAuthenticate]')
                    AND OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[Sp_UserAuthenticate]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vw_SqlProcesses]'))
drop View [dbo].[vw_SqlProcesses]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SessionUser]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[SessionUser]

