exam questions

Exam 1z0-148 All Questions

View all questions & answers for the 1z0-148 exam

Exam 1z0-148 topic 1 question 32 discussion

Actual exam question from Oracle's 1z0-148
Question #: 32
Topic #: 1
[All 1z0-148 Questions]

Examine this code executed in the ORA1 schema:

Examine this code executed by DBA_USER who has been granted the DBA role:
REVOKE INHERIT PRIVILEGES ON USER dba_user FROM PUBLIC;
Examine this query:
SELECT return_date (1) FROM dual;
What is the result of executing this query in the DBA_USER schema?

  • A. It will fail with a compile-time error.
  • B. It will execute successfully and return the date but the DBA role will not be granted to ORA1.
  • C. It will fail with a runtime error complaining of insufficient INHERIT PRIVILEGES.
  • D. It will execute successfully, return the date and the DBA role will be granted to ORA1.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Rakeshpro
2 years, 4 months ago
https://oracle-base.com/articles/12c/control-invoker-rights-privileges-for-plsql-code-12cr1 The REVOKE statement can revoke the INHERIT PRIVILEGES privilege from a user.
upvoted 1 times
...
chrishillinger
2 years, 5 months ago
Selected Answer: C
C is correct, error will only happen at runtime
upvoted 1 times
...
sudhirdavim
4 years, 1 month ago
Correct answer is C. Explanation is mentioned in the link shared by @DmitryPDN.
upvoted 2 times
...
CosminCof
4 years, 2 months ago
B is the correct answer
upvoted 1 times
CosminCof
4 years ago
My bad ... correct is C
upvoted 2 times
...
...
Skiv
4 years, 4 months ago
Executing SELECT return_date(1) FROM dual; gives error: ORA-00904: "RETURN_DATE": invalid identifier, because query executed in DBA_USER schema and function return_date is in ORA1 schema. Then there should be option A?
upvoted 1 times
CosminCof
4 years, 1 month ago
you forgot something, return_date function is granted to PUBLIC, it's not granted directly to DBA_USER ....
upvoted 1 times
...
...
Marianusrex
4 years, 8 months ago
I think the B is the correct answer, as there is an exception handler within the granting routine, which catches the privilege error at execution.
upvoted 3 times
...
DmitryPDN
5 years ago
C is the correct answer according to this https://oracle-base.com/articles/12c/control-invoker-rights-privileges-for-plsql-code-12cr1
upvoted 4 times
szefco
4 years, 8 months ago
B is correct answer, as per your source: "The presence of the exception handler means regular users can run the code without noticing a difference, even though the grant would fail."
upvoted 1 times
szefco
4 years, 8 months ago
Apologies, my bad. @DmitryPDN is right. C is correct answer. in 12c Oracle added feature that throws an error in this situation
upvoted 2 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago