Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make triggers inactive for other databases

Status
Not open for further replies.

memcom

MIS
Nov 19, 2002
56
US
We use a number of triggers in our production database. We frequently have to create a backup of our production database and restore it to a testing database on the same server with a different name. The problem I have, is that a number of the triggers are for email notification and I do not want those triggers to be active on the testing database. Other triggers are needed however. What is the best way to disable some triggers on the testing database? Is it possible to add a line to the trigger to only run if the current database is a given name? or do I need to setup a script to run that will delete triggers that are a given name?
 
This is the general command :

ALTER TABLE table_name

DISABLE TRIGGER trigger_name --or ALL, which disables all triggers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top