Friday, October 19, 2012

prepare script for enabling and disabling trigger in teradata


This kind of scripts are required when the system is going for maintenance.

SELECT 'Alter trigger '|| TRIM(databasename) || '.' || TRIM(triggername) || ' Disabled' ||';'
FROM dbc.triggers
WHERE  Enabledflag = 'Y'
ORDER BY databasename, tablename, triggername;

No comments:

Post a Comment