Re: Cursor in a trigger

From: Jacco Schalkwijk (NOSPAMjaccos_at_eurostop.co.uk)
Date: 02/25/04


Date: Wed, 25 Feb 2004 13:56:18 -0000

Nope, it's really bad thing. All the locks that your transaction has taken
out are held for the durtion of the trigger, and cursors are slow, so the
locks will be held for a relatively long time, increasing the chance of
blocking problems, which can impact the performance of your database
severely.

-- 
Jacco Schalkwijk
SQL Server MVP
"Guy Tanguay" <guy_tanguay@hotmail.com> wrote in message
news:3b53412a.0402250552.3ab1babb@posting.google.com...
> General Rule?
>
> Is it a good thing to put a Cursor in a trigger?


Relevant Pages

  • Re: Opinions on approach, please...
    ... that INTENTIONALLY used "locks" to serialize ... It all comes down to database design taking in consideration what the ... It is perfectly possible to declare 2 cursors. ... With standard COBOL indexed files, if any process added a records PAST ...
    (comp.lang.cobol)
  • Re: Opinions on approach, please...
    ... I the reason that I mentioned "locks" is that I am familiar with applications ... It all comes down to database design taking in consideration what the ... It is perfectly possible to declare 2 cursors. ... With standard COBOL indexed files, if any process added a records PAST ...
    (comp.lang.cobol)
  • Re: Trigger runs Cursor so fast that tables are locked
    ... >update 5 records using an UPDATE query, the trigger runs once but the cursor ... >The process that runs calls a Stored Procedure in the local database ... decide to do an explicit ROLLBACK in the trigger, the locks for modified ...
    (microsoft.public.sqlserver.programming)
  • Trigger for insert cant get all rows when bulk insert
    ... -- instead of using cursors use triggers. ... -- Please show me a way to get the results of the execution of "ABC trigger" ... declare AllUpdatedRowsAreHere cursor for select au_id, ... -- the below code doesnt work for bulk update ...
    (microsoft.public.sqlserver.programming)
  • Re: [PATCH] applesmc - fix crash when activating a led trigger on the keyboard backlight
    ... after activating this trigger the machine will either lock-up ... This is caused by the fact applesmc_backlight_set locks a mutex (or more ... Its never safe for a brightness_set handler to sleep. ...
    (Linux-Kernel)

Loading