
/****** Object:  StoredProcedure [getSession] ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getSession]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
    DROP PROCEDURE [getSession];
GO
	
CREATE PROCEDURE [dbo].[getSession]

(
	@SessionID int
)
WITH EXECUTE AS OWNER
AS
	SELECT
		[SessionID],
		[UserID],
		[DTSDtart],
		[DTSEnd],
		[DTSActivity],
		[LastChanged],
		[MachineName],
		[ProcessID]
	FROM [Sessions]
	WHERE [SessionID]=@SessionID
	RETURN
GO
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'Procedure Creation: getSession Succeeded'
ELSE PRINT 'Procedure Creation: getSession Error on Creation'
GO
