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
Explanation:
it said
(Choose two.)but D is true,
but maybe be C is also
“but maybe be C is also” it is not correct. AFTER LOGOFF not exists.
I think “ON QRXABASE” this is “ON DATABASE” and my answer: B and D
B and D are the right answers
Yes I agree with OLDBoyOdeSu…
QRXABASE might be a typo
Answers would be B and D
A & D
A is not correct, because the question explicitly mentions “user of the *database* logs off.”
So B is correct (QRXabase is a typo to DATabase)
Only D.
B and D are correct, we need to specify the schema name like hr.schema if we use ON SCHEMA.
http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/triggers.htm#CIHEFBJA
No need to mention as “on hr.schema”. ON SCHEMA is also valid which refers to current schema
B and D are correct.
B is ‘On Database’ because we need to maintain time and date of database logoff.
D is because time and date should be recorded just before log off.
B, D
since database can have any name and B is not a typo.
I logged in to sys user . created
SQL>
SQL> create table log_trig_table(user_id varchar2(25),
2 log_date date,
3 action varchar2(25));
Table created
SQL>
SQL> CREATE OR REPLACE TRIGGER logoff_trig
2 BEFORE LOGOFF ON database
3 BEGIN
4 INSERT INTO log_trig_table(user_id, log_date, action)
5 VALUES (USER, SYSDATE, ‘Logging off’);
6 END;
7 /
Trigger created
LOGGED OFF SYS.
Now I logged in to HR.
SQL> create table log_trig_table(user_id varchar2(25),
2 log_date date,
3 action varchar2(25));
Table created
SQL>
SQL> CREATE OR REPLACE TRIGGER logoff_trig_schema
2 BEFORE LOGOFF ON schema
3 BEGIN
4 INSERT INTO log_trig_table(user_id, log_date, action)
5 VALUES (USER, SYSDATE, ‘Logging off’);
6 END;
7 /
Trigger created
LOgged off HR.
LOGGED INTO SYS
SQL> select * from log_trig_table;
USER_ID LOG_DATE ACTION
————————- ———– ————————-
SYS 7/23/2014 2 Logging off
SYS 7/23/2014 2 Logging off
SYS 7/23/2014 2 Logging off
HR 7/23/2014 2 Logging off
SYS 7/23/2014 2 Logging off
SYS 7/23/2014 2 Logging off
HR 7/23/2014 2 Logging off
HR 7/23/2014 2 Logging off
SYS 7/23/2014 2 Logging off
9 rows selected
SQL> select * from hr.log_trig_table;
USER_ID LOG_DATE ACTION
————————- ———– ————————-
HR 7/23/2014 2 Logging off
HR 7/23/2014 2 Logging off
SQL>
Based on the above analysis, we can say A and D is correct.
we can ignore B as there is a spelling mistake.
A and D is correct. refer to https://docs.oracle.com/database/121/TDDDG/tdddg_triggers.htm#TDDDG52900
A,D
A,D
Heena provided prove link
B and D are correct.
BEFORE LOGOFF ON DATABASE – EACH user of database!
BEFORE LOGOFF ON SCHEMA – only one user of database.
B and D.
ON QRXABASE = ON DATABASE
plsql 11g part2, les_9.ppt pg-18
Answer-A,D
Fahamida can you please leave your email, so that I can contact you because all your answers are right..And am gonna need your help..so pls
Thank You
my email is [email protected]
B and D are correct
ON DATABASE for every user in database
Yes, it’s correct, in case of SCHEMA logging will be able only for SCHEMA owner.
the right answers are B & D
B is typo –(DATABASE)
Heena ,The link you provided is right if you want to check the log off hr schema,but in this question asks about time for each user of the database .
??
BD
B,D
[schema.]SCHEMA
Defines the trigger on the specified schema. Default: current schema. The trigger fires
whenever any user connected as the specified schema initiates the triggering event.
DATABASE
DATABASE defines the trigger on the root. The trigger fires whenever any user of the
specified database or pluggable database initiates the triggering event.