Who may create a trigger on SYSOBJECTS table
From: Boaz Ben-Porat (bbp_at_milestone.dk)
Date: 06/21/04
- Next message: Alberto Brivio: "Web Page and database authentication"
- Previous message: Vlad Vissoultchev: "Re: ADO and a-sync cancelling of statement"
- Next in thread: David Portas: "Re: Who may create a trigger on SYSOBJECTS table"
- Reply: David Portas: "Re: Who may create a trigger on SYSOBJECTS table"
- Reply: Raymond D'Anjou \(raydan\): "Re: Who may create a trigger on SYSOBJECTS table"
- Reply: Hari Prasad: "Re: Who may create a trigger on SYSOBJECTS table"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 21 Jun 2004 17:24:56 +0200
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
- Next message: Alberto Brivio: "Web Page and database authentication"
- Previous message: Vlad Vissoultchev: "Re: ADO and a-sync cancelling of statement"
- Next in thread: David Portas: "Re: Who may create a trigger on SYSOBJECTS table"
- Reply: David Portas: "Re: Who may create a trigger on SYSOBJECTS table"
- Reply: Raymond D'Anjou \(raydan\): "Re: Who may create a trigger on SYSOBJECTS table"
- Reply: Hari Prasad: "Re: Who may create a trigger on SYSOBJECTS table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|