SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Table journal

By Boka, 2007/12/12

Total article views: 996 | Views in the last 30 days: 11

Similar to audit table script by Christopher this procedure is used to keep track on every single action on table. In addition, it keep old and new values, the name of the current security context as well as system date/time.

Once when you execute this SP against some user table it will create table prefixed with jrn_<table_name> and trigger on original table.

Once when you have journal table it's quite easy to make audit scipt like this one which return list of updated records (with print out of changed fields only).

By Boka, 2007/12/12

Total article views: 996 | Views in the last 30 days: 11
Your response
 
 
Related Articles
FORUM

Table Size

table

FORUM

temp table

temp table

FORUM

table_size

table_size

FORUM

Archieve Table

Archieve Table

FORUM

Table size

Table size

Related tags

Audit    
journal    
Triggers    
 
Contribute

Free registration required...

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Login (existing users)

Login

Email:   Password:   Remember me: Forgotten your password?

Register (new users)

Register

Email:   Password:
Confirm:

Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

Steve Jones
Editor, SQLServerCentral.com