locked
SQL server audit to capture multiple objects? RRS feed

  • Question

  • I am trying to capture all select statements being performed against all the tables in a database. I tried SQL server audit, it works fine for a given table, GUI allows us to select select objects or multiple objects. Even T-SQL for doing that, we can add multiple objects by specifying them one after the other by specifying ADD

    But is there a way to specify 'audit all the tables in a database'? Even if I use the GUI to select all the tables in a database, if a new tables is created, that will not be part of audit. So I am trying to find out if there is a way to perform an audit over all the tables in a given database

    Thanks

    Satya

    Monday, September 12, 2011 3:00 PM

Answers

  • Satya,

     

    I don´t thing that this is able with only SQL Server, thing this: Imagine if every insert, update or deleted will be audited, you will have a poor performance.

    Maybe with powershell you can do something.

    For a short period of time you can use backup grande traces or even the profiler.


    Fabrizzio A. Caputo
    Certificações:
    Oracle OCA 11g
    MCITP SQL Server 2008 Implementation and Maintenance
    MCITP SQL Server 2008 Developer
    Blog Pessoal: www.fabrizziocaputo.wordpress.com
    Blog Empresa: www.tripletech.com.br/blog
    Twitter: @FabrizzioCaputo
    Email: fabrizzio.antoniaci@gmail.com
    • Proposed as answer by Peja Tao Wednesday, September 14, 2011 5:31 AM
    • Marked as answer by Peja Tao Sunday, September 18, 2011 2:59 PM
    Monday, September 12, 2011 5:21 PM