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?
A.
CREATE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR2 RESULT_CACHE RELIES_ON (departments) AUTHID CURRENT_USER IS date_hired DATE;
B.
CREATE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR2 RESULT_CACHE AUTHID CURRENT_USER IS date_hired DATE;
C.
CREATE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR2 RESULT_CACHE AUTHID DEFINER IS date_hired DATE;
D.
CREATE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR2 RESULT_CACHE RELIES_ON (employees) AUTHID CURRENT_USER IS date_hired DATE;
E.
CREATE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR2 AUTHID DEFINER IS
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)
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
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.
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
This section is not available anymore. Please use the main Exam Page.1z0-148 Exam Questions
Log in to ExamTopics
Sign in:
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.
yurijk
Highly Voted 5 years, 6 months agomuradh8
1 year, 7 months agochrishillinger
Most Recent 2 years, 11 months agoCosminCof
4 years, 9 months agoolkaolka
4 years, 11 months agoolkaolka
4 years, 11 months agoAdela_bg
5 years, 1 month agoTinamoran
5 years, 8 months agoKatana19
5 years, 8 months agoorakell
5 years, 7 months agoorakell
5 years, 7 months ago