Reply to Re: Can SQL Lose Records?

Your name:

Reply:


Posted by Alex Kuznetsov on 06/21/07 01:28

On Jun 20, 5:01 pm, "Neil" <nos...@nospam.net> wrote:
> > Never heard of it. Revoke delete permissions from all your users. Add
> > a trigger prohibiting any deletes.
>
> If I add a trigger prohibiting any deletes, then it wouldn't be possible for
> me to go in and delete a record if I ever needed to, right? Or is there a
> way to set up a trigger so that it can allow the delete in some cases?
>
> Thanks.

You can disable the trigger for the duration of your delete.
Alternatively you can have you trigger allow you to do whatever you
want, based on user_id() or suser_id(). Trigger can be bypassed using
nested triggers and or recursive trigger setting. There are other ways
best described in T-SQL Programming by Itzik Ben-Gan.

http://sqlserver-tips.blogspot.com/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация