Which statements are true about database triggers?

Which statements are true about database triggers? (Choose all that apply.)

Which statements are true about database triggers? (Choose all that apply.)

A.
They can invoke only PL/SQL procedures

B.
They can include SQL and PL/SQL or calls to Java procedures.

C.
They are implicitly fired by an event that must occur within an application

D.
They are implicitly fired when a triggering event occurs, depending on which useris connected

Explanation:
http://docs.oracle.com/cd/A57673_01/DOC/server/doc/SCN73/ch15.htm



Leave a Reply 22

Your email address will not be published. Required fields are marked *


Tr

Tr

B, D

A DATABASE trigger is created on the database and fires whenever any database user initiates the triggering event.

Thomas Kyte

Thomas Kyte

B, D

Why D is correct answer?
Triggers on DDL statements or logon/logoff events can also be defined at the database level or schema level. Trigger defined at the schema level fires only when the triggering event involves that schema.

Alisa

Alisa

D.
They are implicitly fired when a triggering event occurs, depending on which user is connected

USER_TRIGGERS describes all triggers owned by the current user. This view does not display the OWNER column.

Triggers on LOGON and LOGOFF Events
LOGON and LOGOFF triggers can be associated with the database or with a schema. Their attributes include the system event and user name, and they can specify simple conditions on USERID and USERNAME.

Balthazar

Balthazar

C is wrong because of the term “occur within an application”

Justas

Justas

only B is correct.

alex

alex

I am not sure of that Justas. Why is D not correct?

lolo

lolo

Triggers are similar to stored procedures. A trigger can include SQL and PL/SQL statements to execute as a unit and can invoke stored procedures. However, procedures and triggers differ in the way that they are invoked. While a procedure is explicitly executed by a user, application, or trigger, one or more triggers are implicitly fired (executed) by Oracle when a triggering INSERT, UPDATE, or DELETE statement is issued, no matter which user is connected or which application is being used.
so.. A is right.. triggers can( invoke) only pl/sql procedure..it doesnot invoke sql or other statement.
B is also right..triggers can(include) sql and pl/sql or calls to java procedure.
C is wrong because it doesnot fire only within an application.
D is wrong because the trigger fires for all users on database not depending on which user is connected.

Giuseppe

Giuseppe

Hi guys,

thanks for your information but i didn’t understand what again the right Answer for this question.

BD or AD ?

Can the database trigger invoke only PLSQL procedure ? right ?

Thanks a lot,
Giuseppe.

KOZ

KOZ

ORACLE DOCUMENTATION (http://docs.oracle.com/cd/B28359_01/server.111/b28318/triggers.htm#CNCPT118):
“A trigger stored in the database can include SQL and PL/SQL or Java statements to run as a unit and can invoke stored procedures.”
“Triggers are implicitly fired by Oracle Database when a triggering event occurs, no matter which user is connected or which application is being used.”