Exam 1z0-148 All QuestionsBrowse all questions from this exam
Question 65

Examine this function body:

Which two headers will allow this function to compile successfully and take advantage of both invokers rights and function result caching?

    Correct Answer: A, B

    The function body requires both invoker rights and function result caching. To achieve invoker rights, the header must include AUTHID CURRENT_USER, and for result caching, it must include the RESULT_CACHE clause. Option A does this and specifies a dependency on a table which is good practice for result cached functions. Option B is also valid as it includes both required clauses but without specifying a dependency table, which is still acceptable. Thus, the correct answers are A and B.

Discussion
yurijkOptions: BD

PLS-00999 & invoker-rights is true but in 11g. in 12c this restriction dissapear. Correct answer: B, D (RELIES_ON is deprecated in 12c, but we can still use it)

muradh8

Yes, B and D

CosminCofOptions: BD

yes, B and D

Adela_bgOptions: BD

I think B and D

chrishillingerOptions: BD

BD is correct - CURRENT_USER and it makes no sense to rely on a table that's not relevant

olkaolka

https://blogs.oracle.com/oraclemagazine/plsql-enhancements AUTHID CURRENT_USER + RESULT_CACHE will lead to err: RESULT_CACHE is disallowed on subprograms in Invoker-Rights modules

olkaolka

Sorry, I was wrong. it was in ora11. In ora 12 AUTHID CURRENT_USER + RESULT_CACHE is OK. According to https://education.oracle.com/oracle-database-advanced-pl-sql/pexam_1Z0-148, Exam has been validated against Oracle Database 12c. Correct answer is B,D.

Tinamoran

E will not fire until you put "date_hired date;" at the end of statement the right answer are C and E D - will prompt an Error(1,10): PLS-00999: implementation restriction (may be temporary) RESULT_CACHE is disallowed on subprograms in Invoker-Rights modules

Katana19

you're wrong !

orakell

C and E both user definer's rights, not invoker's rights.

orakell

use, not user