Solved

SQL Server 2000 - Help with simple trigger

Posted on 2013-01-26
2
313 Views
Last Modified: 2013-01-26
Hi..
I need a simple trigger to log all changes to a CUSTOMERS table.
I want to crate a a table call CUSTOMERS_LOG  (copy of Customers table) and log the ALL the fields and changes - Maybe include a field for Insert, Update , Delete with a timestamp.

thx
0
Comment
Question by:JElster
2 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38822165
If you search the web for such trigger code, you should find examples...
And if you have a specific problem, we can help.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 400 total points
ID: 38823046
Here is one example from a member of this site:
Generic audit trail trigger
http://www.nigelrivett.net/SQLTriggers/AuditTrailTrigger.html
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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 shrink a transaction log file down to a reasonable size.

707 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

12 Experts available now in Live!

Get 1:1 Help Now