Monday, March 12, 2012

Place a triiger on sysprocesses table

Hi,
I have to set up a trigger on master database sysprocesses, but when I
execute the trigger, I got an error, says "CREATE TRIGGER permission denied
on object 'sysprocesses', database 'master', owner 'dbo'." Can anybody help
me on this?
Thanks
You cannot create triggers on system tables. If you post what you want to achieve, perhaps someone
can reply with a suggestion.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Hong Wang" <HongWang@.discussions.microsoft.com> wrote in message
news:7515D739-3472-4D43-9D81-80E1C0744893@.microsoft.com...
> Hi,
> I have to set up a trigger on master database sysprocesses, but when I
> execute the trigger, I got an error, says "CREATE TRIGGER permission denied
> on object 'sysprocesses', database 'master', owner 'dbo'." Can anybody help
> me on this?
> Thanks
|||Triggers are not supported on system tables. What exactly are you trying to
achieve?
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Hong Wang" <HongWang@.discussions.microsoft.com> wrote in message
news:7515D739-3472-4D43-9D81-80E1C0744893@.microsoft.com...
> Hi,
> I have to set up a trigger on master database sysprocesses, but when I
> execute the trigger, I got an error, says "CREATE TRIGGER permission
denied
> on object 'sysprocesses', database 'master', owner 'dbo'." Can anybody
help
> me on this?
> Thanks
|||I need to audit the sysprocesses table, and if somebody is using MS Access to
modify any data on the server, then send out Email alert and kill the
process. Any idea how can I do this without using a trigger?
Thanks.
"Narayana Vyas Kondreddi" wrote:

> Triggers are not supported on system tables. What exactly are you trying to
> achieve?
> --
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Hong Wang" <HongWang@.discussions.microsoft.com> wrote in message
> news:7515D739-3472-4D43-9D81-80E1C0744893@.microsoft.com...
> denied
> help
>
>
|||Just because they connect to the server doesn't mean they are going to
change data. I would suggest you do not allow those particular logins
access the database. Why give them access if you are trying to prevent
it?
If OTOH you are saying that the user requires access to the database
from certain applications, but not others, you might consider using
Application Roles (see Application Roles and sp_addapprole in BOL for
more information).
David Gugick
Imceda Software
www.imceda.com
|||This is for SOX audit. I have to provide a way to prove that if anyone did
get into certain data without using the application front end, we can catch
it.
"David Gugick" wrote:

> Just because they connect to the server doesn't mean they are going to
> change data. I would suggest you do not allow those particular logins
> access the database. Why give them access if you are trying to prevent
> it?
> If OTOH you are saying that the user requires access to the database
> from certain applications, but not others, you might consider using
> Application Roles (see Application Roles and sp_addapprole in BOL for
> more information).
>
> --
> David Gugick
> Imceda Software
> www.imceda.com
>
|||As David said, look at application roles. If that's not an option, take a
look at APP_NAME() and USER_NAME and few other similar functions to find the
current user name and application name (session based)...
Example:
DECLARE @.CurrentApp varchar(35)
SET @.CurrentApp = APP_NAME()
IF @.CurrentApp <> 'MS SQL Query Analyzer'
PRINT 'This process was not started by a SQL Query Analyzer query session.'
Sasan Saidi, MSc in cs
Senior DBA
Brascan Business Services
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Hong Wang" wrote:
[vbcol=seagreen]
> This is for SOX audit. I have to provide a way to prove that if anyone did
> get into certain data without using the application front end, we can catch
> it.
> "David Gugick" wrote:

No comments:

Post a Comment