Re: Who may create a trigger on SYSOBJECTS table

From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 06/21/04


Date: Mon, 21 Jun 2004 20:48:24 +0530

Hi,

You cant create triggers on system tables.

Thanks
Hari
MCDBA

"Boaz Ben-Porat" <bbp@milestone.dk> wrote in message
news:#1LbqP6VEHA.2168@TK2MSFTNGP10.phx.gbl...
> Hi all
>
> Is it possible to create a trigger on SYSOBJECT ?
>
> I am logged on as dbo, and trying to create a trigger that executes when a
> table with a specific name is created.
>
> 1) Check if you are DBO:
> select user
> Result: dbo
>
> 2) Create a trigger
>
> CREATE TRIGGER [BBP_SO_AI] ON [dbo].[sysobjects]
> FOR INSERT
> AS
> declare @name sysname
> declare @tp char(2)
> select @name = [name] from inserted
> select @tp = [xtype] from inserted
> if @name like 'BBP%' and @tp = 'U'
> insert into atrace values (1, current_timestamp)
>
> Result:
> Server: Msg 229, Level 14, State 5, Procedure BBP_SO_AI, Line 65535
> CREATE TRIGGER permission denied on object 'sysobjects', database
> 'BBP_TEST1', owner 'dbo'.
>
> Any soloution ?
>
> TIA
>
> Boaz ben-Porat
> Milestone Systems
> Denmark
>
>



Relevant Pages

  • Who may create a trigger on SYSOBJECTS table
    ... Is it possible to create a trigger on SYSOBJECT? ... I am logged on as dbo, and trying to create a trigger that executes when a ... Check if you are DBO: ...
    (microsoft.public.sqlserver.programming)
  • Re: Who may create a trigger on SYSOBJECTS table
    ... Microsoft does not support triggers on system tables. ... > Is it possible to create a trigger on SYSOBJECT? ... > 1) Check if you are DBO: ...
    (microsoft.public.sqlserver.programming)
  • monitoring users tables...
    ... Last day when a worked whith system, ... I executed sp_help trigger and the ... I was probeing to create a trigger for deleted in ... sysobject and it was impossible. ...
    (microsoft.public.sqlserver.programming)
  • Re: Trigger for audit log
    ... user Truncates the table, all data is dropped, and no trigger is called, no ... database set up so that only your dbo can truncate, and more importantly, ...
    (microsoft.public.sqlserver.programming)
  • User security
    ... I was wondering since we cant add a trigger to sysusers or sysxlogins how can ...
    (microsoft.public.sqlserver.security)