?
Solved

sql Audit table

Posted on 2016-09-25
3
Medium Priority
?
157 Views
Last Modified: 2016-10-27
Hi , I need to create audit Log, any user add any records to table  what is old value and new value
For example
some one add employee Table

Audit Table

Empid employeeSalary Datechanged Createdby
1             20000               20/08/2015      ryan         <------ Old Records
1             30000               25/09/2015      Stephen  <----- New Records


After add new records

I need to do at least 50 tables.

Thanks
0
Comment
Question by:ukerandi
3 Comments
 
LVL 36

Expert Comment

by:ste5an
ID: 41815000
Take a look at CDC.
0
 
LVL 37

Accepted Solution

by:
Pawan Kumar earned 2000 total points
ID: 41815214
There are multiple options for auditing in SQL Server. They are

Server level

1. C2 Auditing.
2. Common Criteria compliance

 try and consider server level auditing. right click on the server and you will get these options. these options are really good since you have do it on larger number of table.

Also you just need to set this option and SQL will handle everything internally.

Enjoy !
Auditing.jpg
0
 
LVL 10

Author Closing Comment

by:ukerandi
ID: 41863159
thanks
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question