A bit of software I'm working on uses triggers in Oracle. We have a whole set that are currently created and disabled in the database. When running a CREATE or REPLACE to modify a trigger that already exists that trigger gets automatically enabled. I understand CREATE will automatically enable something but why is replace doing this?
Also what's weird however is that this only happens on one of our databases, the others are fine. Is there a setting inside the database that is causing this possibly or is enabling expected behavior of REPLACE?
I suppose that the OR REPLACE clause is considered a modifier of the CREATE command rather than a command by itself. And the CREATE TRIGGER command is designed to do so:
Use the CREATE TRIGGER statement to create and enable a database trigger [...]
When you create a trigger, the database enables it automatically. You can subsequently disable and enable a trigger with the DISABLE and ENABLE clause of the ALTER TRIGGER or ALTER TABLE statement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With