Like some others here, I'm not in favor of the "count" method of doing these DELETEs. In particular, if the process has to be stopped and then resumed later, you have to scan the entire table again to get the count to use in the processing.
Aside from that, there's definitely a potential for locking issues with this statement from the original code:
SELECT @cnt = COUNT(*)
WHERE EventCloseDate < GETDATE() - 6 -- remove rows older than 6 days
since the entire table will have to be scanned. OK, a table scan may be unavoidable, since the only index is on id, and we need to check the date column as well, but at least we can use NOLOCK. Since we're only concerned with obsolete rows, that shouldn't be an issue.
Since the id is the clus key, I suggest just getting the max id that needs deleted. Also, personally I would strip the time from the date, so that mutliple runs in the same day would all delete the same rows, rather than based on the time the command happened to run.
Finally, I would use a variable for the days to keep, so that the code is self-documenting rather than relying on textual comments.
So, putting it all together, something like this perhaps:
DECLARE @days_of_history_to_keep int
SET @days_of_history_to_keep = 6
DECLARE @EventId bigint
IF OBJECT_ID('EventTracking.dbo.Event_Delete_Control') IS NOT NULL
DROP TABLE EventTracking.dbo.Event_Delete_Control
SELECT @EventId = MAX(EventId)
FROM [EventTracking].[DBO].[Event] WITH (NOLOCK)
EventCloseDate < DATEADD(DAY, -@days_of_history_to_keep, DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()), 0))
-- store the controlling values in case this process has to be restarted later
SELECT @EventId AS EventId
--the DELETE statement inside the DELETE loop (naturally other code will enclose this)
DELETE TOP (nnnn)
EventId <= @EventId
SQL DBA,SQL Server MVP(07, 08, 09) Prosecutor James Blackburn, in closing argument in the Fatal Vision murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."