Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating audit trails ( database activity logs of users)

Status
Not open for further replies.

kosta

Programmer
Feb 9, 2001
186
CA
Hi All experts,
i am VFP developer and newly SQL server . i want to create stored procedure or triggers ( which is best and practice,easy) for tracking user activities on tables ( add delete update ) . i am doing it in VFP just a funciton in storec procedure ( named myaudit ) and i put myaudit("I") myaudit("U") myaudit("D") to the dbf tables table-triggers section at design time. that's enough my needs.

So i want to do the same thing on sql server . i dont need professional solution just track these activities and keep its on the table such as audit.

How can i do this ?
any help will be very appreciated

TIA

Soykan OEZCELIK
 
KOSTA

Wouldn't this question be better asked in forum183?

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Mike,
i've allready asked same question at forum183 :)

Soykan OEZCELIK
 
Soykan,

In SQL Server, you use the CREATE TRIGGER command to create a trigger. Unlike in VFP, you only need to create one trigger, not separate ones for insert, update and delete. You can also create a trigger in the Enterprise Manager, by right-clicking on the table name and selecing All Tasks / Manage Triggers.

If you need any more detailed information, I suggest you follow Mike Gagnon's advice and post a message in a SQL Server-related forum.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top