Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mk_garg20
Constraint Violating Yak Guru
343 Posts |
Posted - 2005-10-04 : 21:01:24
|
Hi ALL,Here is what i am thinking to write a stored procedure to do following:-1. Drop triggers on table "A"2. Do some processing.3. Recreate triggers on table "A"My problem is i dont know how to drop & recreate all triggers programmatically.Please help me.Thanksmk_garg |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-10-04 : 21:15:03
|
You don't have to drop triggers to keep them from running:ALTER TABLE myTable DISABLE TRIGGER ALL... run code here ...ALTER TABLE myTable ENABLE TRIGGER ALL |
|
|
mk_garg20
Constraint Violating Yak Guru
343 Posts |
Posted - 2005-10-04 : 21:30:32
|
great thanksmk_garg |
|
|
|
|
|