.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Auditing Triggers

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :

Hi, I have an SQL Server 2005 database, whose tables were audited by triggers. I wanna know if by SQL Profiler I can audit the modification of those triggers as well as the enable an disable activity.

Many thanks !

View Complete Post

More Related Resource Links

CLR Inside Out: Memory Usage Auditing For .NET Applications


Memory usage can have a direct impact on how fast an application executes and thus is important to optimize. In this article we discuss the basics of memory optimization for .NET programs.

Subramanian Ramaswamy and Vance Morrison

MSDN Magazine June 2009

Office Space: Custom Auditing In SharePoint


Learn how to enable an auditing solution for Windows SharePoint Services (WSS) 3.0 with customized control pages in Microsoft Office SharePoint Server (MOSS) 2007.

Ted Pattison

MSDN Magazine September 2008

Data Points: Disabling Constraints and Triggers


What to do when you need to disable triggers and constraints to perform data synchronization and other tasks with an offline database.

John Papa

MSDN Magazine April 2007

Can I use TCP sockets within managed funcs, triggers and stored procedures?

I have seen nothing prohibiting this, but have not yet had time to write some test code. Does anyone know for sure if SQL Server 2008 prohibits or allows TCP sockets for communications, inside a C# SQL/CLR function or method? I guess it must because this is implict when creating data connections and so on, which are obvioulsy allowed. Thanks Cap'n  

I have 3 triggers defined on an sqlserver2008 table and I can't find them with c#

I've got the code below and when I run it, it always says there are 0 triggers in table.Triggers.  I added some debugging code checkin the table.HasDeleteTrigger, etc. and from that, I get the exception: "To accomplish this action, set property HasDeleteTrigger." when I try to set it to bool hasDeleteTrigger. I can get stored procedures find, just not triggers. Below is my problem code: foreach (Database database in databaseCollection) { if (database.Name.Equals(catalogName)) { // first we need to delete triggers associated with all tables that begin // with our prefix. we can skip our the framework tables because those // don't have triggers on them // grab all tables, filter for non prefixed ones in foreach loop so we can delete triggers from non prefixed ones results.AddRange(from Table table in database.Tables select table.Name); foreach (var tableName in results) { var table = new Table(database, tableName, CrSyncDbSchemaName); table.Refresh(); bool hasDeleteTrigger = table.HasDeleteTrigger; bool hasAfterTrigger = table.HasAfterTrigger; bool hasInsertTrigger = table.HasInsertTrigger;



Disable Auditing

Hi, http://msdn.microsoft.com/en-us/library/bb397403%28office.12%29.aspx   After activating the above solution, I unchecked all items in the site settings "Configure Audit Settings" screen. However, the audit log is still populating. Prior to installing this, the audit table in the database had always been empty. I have checked a few of the libraries with entries in the log just to make sure there are no item level options enabled, but none of these have any Information Management policies. I have also checked content types and again no policies. I have since retracted and removed the solution but this has not solved my issue. How can I disable audit logging?

Triggers when Log-Shipping is used

When we restore a db using Log-shipping, do the triggers in the destination db get fired from the changes occured in the shipped log? I guess the answer is negative but just want to make sure I am not missing anything. Thanks in Advance.  

How can I do auditing for task list?

Hello I reviewed and implemented following article for document library, and it seems to be working perfect. Then I tried same concept for "Tasks" list, it seems to be working fine, but it not show other auditing event like insert/update/view event. As per the article it is showing only "View Logs Report". PLease let me know how can I make this workable for "Task" list? http://msdn.microsoft.com/en-us/library/bb397403(office.12).aspx

Auditing of a Site Collection deletion

Is there a way in MOSS 2007 to determine who has deleted a site collection?  From my understanding you can use the Audit Logs of a Site Collection to see what was deleted but where do I look, if there is somewhere, to see who deleted the site collection itself. I have looked in the "C:\Program Files\Common Files\Microsoft Shared\web server\extensions\12\LOGS" but can't find anything related to the deletion.  My current diagnotic log settings for "Administration" assuming that is the correct category are set to Event Log: Error and Trace Log: Medium. Thank you, Don

How can I use triggers ?

I have a Database with some tables in an Asp.Net project (C#),I wanna to run a method in C# whenever some data was written in the tables. I know I have to use triggers, but I don't know how!!!It would be appreciated if you guide me. P.S:I'm using SQLExpress 2008,

Update Panels, Postback Triggers, and GridViews, Oh my

I've been battling with this page for the past couple days and it works, but it's annoying, so I am hoping someone maybe has dealt with this and can help me a little.   I have an UpdatePanel that acts as a container for a number of other update panels, everything in this container works.  I got the bright idea to add a ModalPopup Extender to enhance the user experience a little when performing a certain function on the site.  The panel that acts as the container for the ModalPopup sits outside the UpdatePanel Container because if it's in the container, any interaction with a child control throws "Input string not in the correct format" error message.  Because this is outside the comfort of the UpdatePanel Container, any control that populates information into the Popup control has to register a Postback.  Thus my problem: the controls that populate the Popup are GridViews.  The only GridView Event I care to cause a PostBack is the SelectedIndexChanged, but PostBack Triggers don't care, they take all comers.  Want to go to the next page? PostBack. Sort? Hell Yeah, Postback. My initial solution is to provide a confirm type of a message under the gridview and have the user confirm their selection by clicking a button to avoid causing a postback until it's necessary, but you know what? That kinda sucks, so I sub

EventHandler triggers another EventHandler

I have two EventHandlers - A and B. EventHandler A populates items in Child list, when Parent list creates a new item. Or vise versa, deletes items in Child list when Parent list deletes an item. There is a ParentID in Child list to refer back to ID column in Parent list. EventHandler B duplicates items from Site 1 to Site 2. i.e. creates a new item in Child list of Site 2, when Site 1 creates a new item in Child list. Or vise versa, deletes item in Child list in Site 2 when Site 1 deletes an item in Child list. The two Child lists are almost identical except Site 2 Child list has SourceID pointing back to ID column in Site 1 Child list ID field.   Site 1                                      Site 2 Parent    | EventHandler A    V Child   --- EventHandler B --->  Child   Now if I create/delete item in Parent list of Site 1, Child list of Site 2 will be affected, thanks to EventHandler A and B. Here A triggers B. If I create/delete item in Child list of Site 1, Child list of Site 2 will be affected as well, here only EventHandler B is triggered. My question is: Is there anyway to tell in EventHandler B, that it is triggered originally from Parent lis

Real Time Stored Procedures and Triggers..

hi ..I am learning  Dot Net and i am looking for a job  in it these days... Every Company looked   if am mainly good in Writing Real Time Stored Procedures and Triggers... I am able to grab the basic concepts , but am not able  to write real time examples.... Kindly let me know some Websites or source  where i can find some real Times examples for  Stored Procedures and Triggers, coz  am interested in  practicing it ... Thanks in Advance...

Why does Output clause have the INTO requirement for tables with enabled triggers?


What is the reason for this restriction for Output clause?

If the OUTPUT clause is specified without also specifying the INTO keyword, the target of the DML operation cannot have any enabled trigger defined on it for the given DML action. For example, if the OUTPUT clause is defined in an UPDATE statement, the target table cannot have any enabled UPDATE triggers.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend