sql - How to take daily snapshots of a table -
sql - How to take daily snapshots of a table -
i building sales database. 1 of tables has hierarchy of sales reps , assigned territories. ohese reps , territories alter every day, , need maintain track of table looks every day. need take snapshots of table daily.
i know have or how have store info in table, able know info in table @ point in time.
is possible?
please maintain in mind table not more 1 megabyte or so.
i suggest using paul nielsen's autoaudit:
autoaudit sql server (2005, 2008) code-gen utility creates audit trail triggers with:
created, createdby, modified, modifiedby, , rowversion (incrementing int) columns table insert event logged audit table updates old , new values logged audit table delete logs final values audit table view reconstruct deleted rows udf reconstruct row history schema audit trigger track schema changes re-code-gens triggers when alter table changes tablehis original blog post: codegen create fixed audit trail triggers
before implement in production suggest restore backup of database development , work on that.
sql sql-server sql-server-2008
Comments
Post a Comment