/*****************************************************************************
*   Presentation: Module 13 - Extended Events 
*   FileName:  Demo 2b - SQLskills_StatementExceedsLastDuration_Workload.sql
*
*   Summary: Workload generator for Module 13 Demo2
*   Summary: Demonstrates how to use complex predicators to minimize event
*			 collection for rapid analysis.
*
*   Date: March 14, 2011 
*
*   SQL Server Versions:
*         2008, 2008 R2
*         
******************************************************************************
*   Copyright (C) 2011 Jonathan M. Kehayias, SQLskills.com
*   All rights reserved. 
*
*   For more scripts and sample code, check out 
*      http://sqlskills.com/blogs/jonathan
*
*   You may alter this code for your own *non-commercial* purposes. You may
*   republish altered code as long as you include this copyright and give 
*	due credit. 
*
*
*   THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF 
*   ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED 
*   TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
*   PARTICULAR PURPOSE. 
*
******************************************************************************/

EXECUTE AdventureWorks2008R2.dbo.StoredProcedureExceedsDuration
GO 10
EXECUTE AdventureWorks2008R2.dbo.StoredProcedureExceedsDuration '00:00:01.050'
GO
EXECUTE AdventureWorks2008R2.dbo.StoredProcedureExceedsDuration
GO 10
EXECUTE AdventureWorks2008R2.dbo.StoredProcedureExceedsDuration '00:00:02.050'
GO
EXECUTE AdventureWorks2008R2.dbo.StoredProcedureExceedsDuration
GO 10
EXECUTE AdventureWorks2008R2.dbo.StoredProcedureExceedsDuration '00:00:01.050'
GO
EXECUTE AdventureWorks2008R2.dbo.StoredProcedureExceedsDuration
GO 10
EXECUTE AdventureWorks2008R2.dbo.StoredProcedureExceedsDuration '00:00:03.050'
GO
EXECUTE AdventureWorks2008R2.dbo.StoredProcedureExceedsDuration
GO 10


EXECUTE sp_executesql N'AdventureWorks2008R2.dbo.StoredProcedureExceedsDuration @WaitForTime', N'@WaitForTime varchar(12)', @WaitforTime = '00:00:04.050'
