I have a trigger that calls a SP. However the SP takes a while to execute. So the trigger is rejected.
What is wrong
/****** Object: Trigger [dbo].[BeginProcessing] Script Date: 10/14/2008 10:23:37 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
ALTER TRIGGER [dbo].[BeginProcessing]
declare @id int,@username varchar(20)
select @id = batchid, @username = username from inserted
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
--exec Processing_BULK @id, @username
exec [dbo].[Processing_BULK ] @id, @username
When I run the exec in red, it works ok. But when i run the execute SP in green, it hangs for a while and then rejects it.
I have tried updating manually. Also ran the SP in Management studio, and has got a problem, only problem is that it takes a while to execute