Re: Column level security

From: Kalen Delaney (kalen_please_reply_on_public_newsgroups_delaney@compuserve.com)
Date: 12/10/02


From: "Kalen Delaney" <kalen_please_reply_on_public_newsgroups_delaney@compuserve.com>
Date: Tue, 10 Dec 2002 07:40:46 -0800


An INSERT inserts a whole row, which must have a value for every column. So
if a user has insert permission, they can insert into every column. If you
want to make sure that a user only inserts default values for particular
columns, a trigger would work nicely, either an AFTER trigger or an INSTEAD
OF trigger.

Constraints are a good thing. Why don't you want to use them?

You can create a view containing just the columns which the user may supply
values to, and give the user permission to insert into the view. All the
columns which aren't in the view need to have defaults already defined, or
to allow NULLs.

HTH

--
Kalen Delaney
SQL Server MVP
"Arzan" <aratesh@hotmail.com> wrote in message
news:05aa01c2a037$dfd55220$d7f82ecf@TK2MSFTNGXA14...
> Hi,
>
> I would like to know if i can restrict a user from
> inserting data into a column. SELECT and UPDATE can be
> controlled however i would like to know if i could do it
> for INSERTS. I dont want to use triggers or contraints.
>
> Regards
> Arzan


Relevant Pages

  • Re: Column level security
    ... "GRANT INSERT ON TO ... " i.e. i want to grant insert permission ... Regards, ... >columns, a trigger would work nicely, either an AFTER ...
    (microsoft.public.sqlserver.security)
  • Re: Column level security
    ... "GRANT INSERT ON TO ... " i.e. i want to grant insert permission ... Regards, ... >columns, a trigger would work nicely, either an AFTER ...
    (microsoft.public.sqlserver.security)
  • Re: Permission required to execute embedded assembly?
    ... during execution of user defined routine or aggregate 'MyDB_AuditTrigger': ... there is no permission issue with the assembly itself. ... Rather the exception occurs with an action performed by the trigger. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.security)
  • Re: Re: Re: Problem Create Trigger in an Oracle-DB
    ... When I look at the table I can't see any trigger. ... Do you have 'resource' permission in your Oracle database? ... > Hi Michael, ...
    (borland.public.delphi.database.ado)
  • Re: OT - Are you a born conservative (or liberal)?
    ... living room showing me how he cut the trigger spring on his .357 to make it ... To pull a trigger on ... a gun without personally checking its condition is extremely reckless. ... And then we can restrict knives, ...
    (alt.sports.basketball.nba.la-lakers)