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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • 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. Oracle Data Guard Command Line Reference (Cheat Sheet)
  2. Oracle Database 18c : How to Merge Partitions And Subpartitions Online
  3. CRSCTL Command Examples in ASM Standalone Configurations
  4. New Background Processes In Oracle 11g
  5. JDeveloper Interview Questions
  6. What Happens and What to Do when the SPFILE has been Manually Modified
  7. How to Optimize a Data Guard Configuration
  8. ORA-00031: session marked for kill
  9. When to Use Startup/Shutdown Database and Alter Database Command in Oracle 12c
  10. How to load SELinux Module For Oracleasm

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright