sql server application audit setup

  • How can i setup the audit on sql server database tables for the change made by the application users. :crying:

    As these are not the direct database logins.. but application logins... so how can I capture the login and change... to map it to the database tables.... any help please...

  • You may have one SQL login for the app but you must be maintaining a users table somewhere in your database.

    If that is the case then you can write custom sprocs to record this information into your audit tables.

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • how am i going to capture the event of the user in the backend ... if its not an database login ??? any sysprocesses is mapped to that sqlogin .. rather than application users.. soory if this is a stupid questions :unsure:

  • No it's not a stupid question at all. You may have to write sprocs to record this information in audit tables as TRIGGERS will not do the job. I updated my original reply as I re-read your question afterwards! 😉

    I'm thinking along the lines of the following:

    Say you want to audit a table called MyTable. You create an audit table called tfrMyTable which will contain the timestamp and application user name along with the other columns. For the front end-end app you would have to write a sproc to populate the audit table, something like usp_recordAudit 'MyTable',1 <---- application user id

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

Viewing 4 posts - 1 through 3 (of 3 total)

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