Solved

Transaction History in SQL SERVER Express

Posted on 2014-03-20
1
359 Views
Last Modified: 2014-03-20
I need to keep Table log in a history table. Can you please suggest me I can get the record from SQL SERVER Log table ?

Or do I need to write trigger for every table and store the data for edit, insert and delete in history table ?

Its a ASP .NET application so I want to store data about the user did the modification and from the IP . Whats the best way to do this ?
0
Comment
Question by:Vikash p
1 Comment
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
ID: 39943207
For DML yes - you would need to put triggers on INSERT/DELETE/UPDATE to generate the Audit(log) records you need to keep.

For DDL you can try use SQL Database DDL triggers meant for that:

http://technet.microsoft.com/en-us/library/ms190989(v=sql.105).aspx
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now