You want to maintain an audit of the date and time when each user of the database logs off.
Examine the following code:
Which two clauses should be used to fill in the blanks and complete the above code?
(Choose two.)
A.
ON SCHEMA
B.
ON QRXABASE
C.
AFTER LOGOFF
D.
BEFORE LOGOFF
create or replace trigger tr_logoff
before logoff on database
begin
insert into log_trail values (user, sysdate, ‘LOGOFF’);
commit;
end tr_logon;
A, D
correct ans B,D
B D, because A on schema logs only this schema logoffs
Tricky question i can say, i asked the same question on forum, and they said me ‘do not try to understand this exam, just pass it…’
You can create trigger for each schema and then you can log every user (but also can create one on database level that is more convenient)
I have a question, the answers are the same simulator that appear on the test ?, well they are incorrect ?
B, D
Agree with you
hmm
b,d
BD
each user of the database logs off ==> on database
BD
AD
bd
To my understanding, users logs on/logs off from their schema, not database. So this should be a schema trigger.
Database triggers can report startup/shutdown of database.
Ans: A, D