Skip to content

vasnake/pmate-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pmate-log

Logging changes in MS SQL tables via triggers.

Main idea was to do logging all changes in set of tables in MS SQL DB. In fact we could use a MS SQL CT, CDC capabilities but we make a decision not to. I'd say we need something simpler. And here it is: two files for implement logging in DB

  • logtable.sql -- SQL script for creating log table
  • createlog.py -- Python script for creating SQL script for creating triggers

Edit these two files and change DB name, log-table name and list of tables for attach triggers to. Then run createlog.py to generate SQL script. Now you can run logtable.sql and generated script in your DB console.

See inside the scripts for details.

About

Logging changes in MS SQL tables via triggers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages