Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 trigger

Author  Topic 

rauk10
Starting Member

16 Posts

Posted - 2008-12-01 : 13:22:23
Hi

I have one scenario:
Whenever I give any permission to any user on any objects then I want to fire a trigger which would update the Audit table with which user and permission that I have given.

I would really appreciate if anyone could tell me how do I make the trigger for that. Or if there any any other ways to have a audit table without implementing a trigger.

Thank You.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-01 : 14:04:38
Why you need audit table for this? Use system stored procs and system tables,DMV to get all information you need.
Go to Top of Page

rauk10
Starting Member

16 Posts

Posted - 2008-12-01 : 15:31:19
Hi Sodeep
Can you tell me which system stored procedure or system table will do this?

Thank you
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-12-01 : 15:39:54
I don't want to interfere, but maybe sodeep means sp_helprotect.
You can see in bol.

Webfred


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-01 : 16:58:51
Look at this valuable script Tfountain and I created.
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=111918
Go to Top of Page

rauk10
Starting Member

16 Posts

Posted - 2008-12-01 : 17:28:43
Thankxs webfred and Sodeep.
Go to Top of Page
   

- Advertisement -