Disable/Enable all triggers in the schema (Oracle)

Normally If you want to enable/disable a trigger you would use the ALTER statement:

But today I had to disable/enable all triggers in the schema, in order to freely insert and update some data . For this task I’ve written a short PL/SQL procedure:

The idea is pretty simple, we iterate over all the user-defined triggers (see user_triggers), building on-the-way statements that are going to be “EXECUTED IMMEDIATELY” .

To execute the procedure you can do something like this:

Hope it’s going to be useful .