Re: Tables security

From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 07/30/03


Date: Wed, 30 Jul 2003 10:20:55 -0400

You could put a "do nothing" INSTEAD OF DELETE trigger on it:

create trigger trd_Customer on Customer instead of delete
as
    return
go

-- 
Tom
---------------------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Le Van Thanh" <lvthanh@hotmail.com> wrote in message news:eOb1QTqVDHA.1692@TK2MSFTNGP11.phx.gbl...
Hi all,
 I created a table, this table's name is Customer, Fields are (CustomerID:nchar(10),CustomerName: Nchar(30)), in SQL Server. How way  can lock this table, all users can not modify it. (if use Sql Server enterprise manager can not modifiy it).
Thanks and Regards
Thanh Le Van    
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...


Relevant Pages

  • Re: Trigger Question
    ... Pro SQL Server 2000 Database Design - ... I just decided that if my trigger for delete was ... >> SQL Server MVP ... >>> UPDATE OrderDetail ...
    (microsoft.public.sqlserver.programming)
  • Re: Question: Triggers
    ... Shelling out to the OS is not a quick thing to do inside a trigger. ... Tibor Karaszi, SQL Server MVP ... I have a VB.NET application which searches for the existence of these ...
    (microsoft.public.sqlserver.server)
  • Re: Records not inserting...
    ... > I am totally new to SQL server. ... However, in a trigger, would I be ... test the effects of certain data modifications and to set conditions for ... UPDATE statements. ...
    (microsoft.public.sqlserver.odbc)
  • Re: Help for an Oracle Newbie
    ... application I wrote using SQL Server ported over to Oracle. ... Obviously there are several built in data types in SQL Server that do ... Of course I had to use a different name for the trigger under each ...
    (comp.databases.oracle.server)
  • Re: TRIGGER (AFTER INSERT) and Store Procedure ... insert failed !
    ... >into SQL server, the record exist anyway! ... >If you refresh the data you will see the record... ... it gets refreshed after trigger excecution automatically. ... I don't know your monitoring system, but I guess that removing the result ...
    (microsoft.public.sqlserver.programming)