15+ PL/SQL Scenario Based Interview Questions for Experienced - 3

Question: 11

What is a BEFORE DROP trigger and when is it executed?

The BEFORE DROP trigger is fired before any statement is executed. If the trigger has to be dropped, then this trigger can also be executed once before the trigger is dropped.

Question: 12

In what condition is it good to disable a trigger?

It is good to disable triggers during data load operations. This improves the performance of the data loading activities. The data modification and manipulation that the trigger would have performed has to be done manually after the data loading.

Question: 13

How can you view the errors encountered in a trigger?

The USER_ERRORS view can be used to show all the parsing errors that occur in a trigger during the compilation until they are resolved.

Question: 14

Are DDL triggers fired for DDL statements within a PL/SQL code executed using the DBMS_SQL package?

No, DDL triggers are not executed for DDL statements, which are executed within the PL/SQL code using the DBMS_SQL package.

Question: 15

Do triggers have restrictions on the usage of large data types, such as LONG and LONG RAW?

Triggers have restrictions on the usage of large data types as they cannot declare or reference the LONG and LONG RAW data types and cannot use them even if they form part of the object with which the trigger is associated. Similarly, triggers cannot modify the CLOB and BLOB objects as well; however, they can reference them for read-only access.

Related Questions