Sql server job to track DB changes -


i have dictionary holds updated tables , fields in db keep build queries , other stuff.

i want refresh dictionary every time table created or changes.

my solution create sql job update table has boolean value called isdbdictionaryupdated every change.

how can activate job general trigger jumps every db structure change?

the easiest thing create ddl trigger fires when tables altered or created. then, using exec statement, can execute job want update dictionary.

create trigger safety  on database  create_table, drop_table, alter_table      exec msdb..sp_start_job         @job_name = 'jobname';  go 

here's link ms article: http://msdn.microsoft.com/en-us/library/ms175941.aspx


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -