Examine the following structure:
SQL> DESCRIBE user_identifiers
Name Null? Type
—————————————– ——– ———————–
NAME VARCHAR2(30)
SIGNATURE VARCHAR2(32)
TYPE VARCHAR2(18)
OBJECT_NAME NOT NULL VARCHAR2(30)
OBJECT_TYPE VARCHAR2(13)
USAGE VARCHAR2(11)
USAGE_ID NUMBER
LINE NUMBER
COL NUMBER
USAGE_CONTEXT_ID NUMBER
Identify two scenarios in which information is stored in the USAGE column. (Choose two.)
A.
an assignment made to VARIABLE
B.
declaration of a variable or formal parameter
C.
an identifier passed to a subprogram in IN OUT mode
D.
execution of the GOTO statement or raise of an exception
Explanation:
USER_IDENTIFIERS is a new view as of 11g, USER_IDENTIFIERS displays information about the identifiers in the stored objects owned by the current user
Column
Owner Owner of the identifier
NAME Name of the identifier
SIGNATURE Signature of the identifier
TYPE Type of the identifier
OBJECT_NAME Name of the object where the identifier action occurred
OBJECT_TYPE Type of the object where the identifier action occurred
USAGE Type of the identifier usage:
DECLARATION
DEFINITION
CALL
REFERENCE
ASSIGNMENT
USAGE_ID unique key for the identifier usage within the object
LINE Line number of the identifier action
COL Column number of the identifier action
USAGE_CONTEXT_ID Context USAGE_ID of the identifier usage
A, C
http://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_plscope.htm#BABBJEBB
A, B (IN OUT will not be applicable.
C is incorrect, OUT pass value defaulty unless it is qualified with NOCOPY while IN pass reference, so IN OUT is not one reference. One IN could be the reference usage.
Sorry not above explaination, An identifier that is passed to a subprogram in IN OUT mode has both a REFERENCE usage (corresponding to IN) and an ASSIGNMENT usage (corresponding to OUT).
AnswerL A, B, C
C is incorrect as your just passing identifier to an defined coding unit(procedure /fucntion) and USER_IDENTIFIERS table will contain the defintion about the in out DECLARATION not the execution history
A, B
A,B
USAGE: The identifier action as CALL, ASSIGNMENT, DEFINITION, DECLARATION, or REFERENCE
ALTER SYSTEM SET PLSCOPE_SETTINGS = ‘IDENTIFIERS:ALL’;
create or replace PACKAGE plch_pkg
IS
TYPE number_nt IS TABLE OF NUMBER;
PROCEDURE pass_nums1 (nums IN OUT number_nt);
END;
CREATE OR REPLACE procedure proc3
IS
sd plch_pkg.number_nt;
ma_va exception;
BEGIN
<>
sd(1):=1;
GOTO ciao;
plch_pkg.pass_nums1(sd);
RAISE ma_va;
END;
/
In user_identifiers column usage is stored with information for every choice (A, B, C and D).