• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Enable a Database Trigger

By admin

Database triggers are PL/SQL code that executes based on event in the database. A trigger is an Oracle statement (or a group of statements enclosed within BEGIN and END statements) that are automatically executed by Oracle in response to any of these statements:

  • ALTER
  • CREATE
  • DROP
  • DELETE
  • INSERT
  • UPDATE

The last three are of the greatest interest—triggers that are executed in response to table row changes.

How to enable a trigger

To enable a database trigger do the following:

SQL> alter trigger [TRIGGERNAME] enable;

To enable all triggers from a table do the following:

SQL> alter table [TABLENAME] enable all triggers;

Dropping a trigger

To drop a trigger, use the DROP TRIGGER statement, as shown here:

SQL> drop trigger [TRIGGERNAME];

Filed Under: oracle

Some more articles you might also be interested in …

  1. How to move or rename a datafile in the same ASM diskgroup (Using ASM alias)
  2. How to Migrate ASM Disk Groups to another Storage Online [non ASMLIB Devices]
  3. Understanding Flashback Table Feature in Oracle Database
  4. How to Create Interval-Reference Partitioned Tables in Oracle 12c
  5. How to Restore a Dropped Pluggable Database (PDB) in Multitenant Environment
  6. How to extend ASM disk from OS level in CentOS/RHEL
  7. How to Modify an Existing ASM Spfile in a RAC Environment
  8. How To Size UNDO Tablespace For Automatic Undo Management
  9. Oracle ASM – How ASM Disk Resync Works
  10. Oracle Database 12c New Feature – Move a Datafile Online

You May Also Like

Primary Sidebar

Recent Posts

  • How to Configure Automatic Package Updates on the Server in CentOS/RHEL 8
  • FATAL: Error inserting rds_rdma
  • Failed to start LSB: Bring up/down networking – On restarting network service CentOS/RHEL (DHCP client)
  • How To Add Timestamps To dmesg Kernel Boot Log in CentOS/RHEL
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary