Which two clauses should be used to fill in the blanks and complete the above code?

You want to maintain an audit of the date and time when each user of the database logs off.

Examine the following code:

(Exhibit)

Which two clauses should be used to fill in the blanks and complete the above code? (Choose two.)

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



Leave a Reply 26

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


OldBoyOdeSu

OldBoyOdeSu

“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

se_abhi

se_abhi

B and D are the right answers

Divya Tanwani

Divya Tanwani

Yes I agree with OLDBoyOdeSu…

QRXABASE might be a typo
Answers would be B and D

qaskhk

qaskhk

A & D

Abhinav Sood

Abhinav Sood

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)

qaisarimtiaz

qaisarimtiaz

Only D.

DV

DV

No need to mention as “on hr.schema”. ON SCHEMA is also valid which refers to current schema

Aarti

Aarti

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.

Harshal

Harshal

B, D
since database can have any name and B is not a typo.

manjusha

manjusha

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>

manjusha

manjusha

Based on the above analysis, we can say A and D is correct.
we can ignore B as there is a spelling mistake.

Uladzimir

Uladzimir

A,D

Heena provided prove link

roman

roman

B and D are correct.

BEFORE LOGOFF ON DATABASE – EACH user of database!
BEFORE LOGOFF ON SCHEMA – only one user of database.

Oista

Oista

B and D.
ON QRXABASE = ON DATABASE

FAHAMIDA(IDB23)

FAHAMIDA(IDB23)

plsql 11g part2, les_9.ppt pg-18

Answer-A,D

Sufiyan

Sufiyan

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

Ahmed

Ahmed

B and D are correct
ON DATABASE for every user in database

Elkhan

Elkhan

Yes, it’s correct, in case of SCHEMA logging will be able only for SCHEMA owner.

lolo

lolo

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 .

SE

SE

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.