auditing

  • Hi,

    How can i set column level auditing to mointor select insert update events in a table through profiler.

    Regards

    Prasanna

  • What do you mean by column level auditing? Do you want to filter events by the columns available in Profiler? Or, do you want to be able to see when only a specific column is changed in a table?

  • Hi Jack,

    We have applied table level trace using profile for event like select ,ineset ,update,alter on all the tables in the database into a table

    we got a msg in the trace table ie.Some trace events have not been reported to SQL Server Profiler because the server has reached its maximum available memory for the process.Apart from using ddl trigger

    is there any way we can use Profiler for particular column in tables for a

    database which contains sensitive information.

    Prasanna.

  • Prasanna,

    SQL Server does not produce any trace events based on table columns. If you need to make sure you do not miss any data with a trace you need to get away from using the Profiler GUI and use a server-side trace that writes to a file. You can then use fn_trace_gettable to read/query the trace file. You can use Profiler to setup the trace definition and export it to a sql file.

    There are some videos on Profiler at www.jumpstarttv.com that can help with this and you should read up on SQL Trace in BOL.

  • Prasanna,

    I used this script to get information about Functions and Updated/Selected columns. I hope this willl atleast give you an idea about it.

    You can also set an auditing trigger for DDL statements that will provide you in depth on what DDL ran on which column or table in database.

    Please read the below blog:

    http://www.sqlservercentral.com/articles/DDL+Event/70657/

    They have scripts in a .Zip file. I have not used that yet but I guess this will provide you more programming knowledge on how to set those auditing triggers.

    Create table #USP_Dependents

    (Usp_name varchar(300),

    Dependent_name varchar(300),

    type varchar(50),

    updated varchar(50),

    selected varchar(50),

    [column]varchar(50)

    )

    Create table #USP_Dep

    (Dependent_name varchar(300),

    type varchar(50),

    updated varchar(50),

    selected varchar(50),

    [column]varchar(50)

    )

    declare @name varchar(500)

    declare cur_depend Cursor for

    Select distinct name from sysobjects

    where xtype = 'FN'

    and name like 'IS%'

    open cur_depend

    fetch next from cur_depend into @name

    while @@FETCH_STATUS = 0

    begin

    INSERT INTO #USP_Dep EXEC sp_depends @name

    INSERT INTO #USP_Dependents(Usp_name,Dependent_name,type,updated,selected,[column])

    select @name,Dependent_name,type,updated,selected,[column]

    from #USP_dep

    delete from #USP_Dep

    fetch next from cur_depend into @name

    end

    close cur_depend

    deallocate cur_depend

    Select * from #USP_Dependents

  • I want to capture specific events like column level modifications on a table. Is it possible to go granular in capturing this by enabling audits at database level?

    I want to do this for auditing purposes. I wan to capture this events and load the changes to another table using ssis package where this ssis package pulls data from sql audit file.

    Any suggestion is greatly appreciated.

    Thanks

  • Hi,

    I know this thread is too old but, I would like to suggest here a very informative blog resource that looks a good solution to resolve your auditing purpose while need to audit all the critical changes even at granular level. Please visit at : http://sqlserverauditing.blogspot.in/2014/02/track-all-critical-and-granular-changes.html

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply