Unix Technical Forum

saving changes made to database

This is a discussion on saving changes made to database within the SQL Server forums, part of the Microsoft SQL Server category; --> I have an application that connects and edits a database's tables. My question is, what is the best way ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 05:25 AM
Jagdip Singh Ajimal
 
Posts: n/a
Default saving changes made to database

I have an application that connects and edits a database's tables.

My question is, what is the best way to save who did what changes to
this database? I need to be able to display this in the application.
The best way I have thought of so far is, to create a new table with
'user', 'date', 'table_name', 'primary_key', 'old field_value' and
'new_field_value' fields. Then I can save which table row had been
changed, by which user and on which date.

I'm sure that there is a way to do this in SQL Server, but I'm not
sure how.

Any help would be appriciated.

Jagdip
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 05:25 AM
John Bell
 
Posts: n/a
Default Re: saving changes made to database

Hi

There is a simple auditing example in Create Trigger topic in Books online,
I would always choose to keep the processing in the trigger to a minimum and
then process the information later as a separate process or when it is
displayed.

For an off the shelf solution you could look at the Lumigent products:
http://www.lumigent.com/Products/

John

"Jagdip Singh Ajimal" <jsa1981@hotmail.com> wrote in message
news:c84eb1b0.0410010403.a28c3c7@posting.google.co m...
> I have an application that connects and edits a database's tables.
>
> My question is, what is the best way to save who did what changes to
> this database? I need to be able to display this in the application.
> The best way I have thought of so far is, to create a new table with
> 'user', 'date', 'table_name', 'primary_key', 'old field_value' and
> 'new_field_value' fields. Then I can save which table row had been
> changed, by which user and on which date.
>
> I'm sure that there is a way to do this in SQL Server, but I'm not
> sure how.
>
> Any help would be appriciated.
>
> Jagdip



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:39 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com