Download Oracle Database 12c: Advanced PL-SQL.1z0-148.SelfTestEngine.2020-04-06.54q.vcex

Vendor: Oracle
Exam Code: 1z0-148
Exam Name: Oracle Database 12c: Advanced PL/SQL
Date: Apr 06, 2020
File Size: 3 MB

How to open VCEX files?

Files with VCEX extension can be opened by ProfExam Simulator.

Purchase
Coupon: EXAM_HUB

Discount: 20%

Demo Questions

Question 1
The STUDENTS table exists in your schema. 
Examine the DECLARE section of a PL/SQL block:
  
Which two blocks are valid? (Choose two.)
  1. BEGIN 
    OPEN cursor3 FOR SELECT * FROM students; 
    cursor1 :=cursor3;
    END;
  2. BEGIN 
    OPEN stcur; 
    cursor1 :=stcur;
    END;
  3. BEGIN 
    OPEN cursor1 FOR SELECT * FROM students; 
    stcur :=cursor1;
    END;
  4. BEGIN 
    OPEN stcur; 
    cursor3 :=stcur;
    END;
  5. BEGIN 
    OPEN cursor1 FOR SELECT * FROM students; 
    cursor2 :=cursor1;
    END;
Correct answer: AE
Question 2
Examine the code:
  
Which two subprograms will be created successfully? (Choose two.)
  1. CREATE FUNCTION p4 (y pkg.tab_typ) RETURN pkg.tab_typ IS 
    BEGIN 
    EXECUTE IMMEDIATE ‘SELECT pdt_id, pdt_name FROM TABLE (:b)’
    BULT COLLECT INTO pkg.x USING y; 
    RETURN pkg.x; 
    END p4;
  2. CREATE PROCEDURE p1 (y IN OUT pkg.tab_typ) IS 
    BEGIN 
    EXECUTE IMMEDIATE ‘SELECT f (:b) FROM DUAL’ INTO y USING pkg.x;
    END p1;
  3. CREATE PROCEDURE p2 (v IN OUT VARCHAR2) IS 
    BEGIN 
    EXECUTE IMMEDIATE ‘SELECT f (:b) FROM DUAL’ INTO v USING pkg.x;
    END p2;
  4. CREATE FUNCTION p3 RETURN pkg. tab_typ IS 
    BEGIN 
    EXECUTE IMMEDIATE ‘SELECT f (:b) FROM DUAL’ INTO pkg.x;
    END p3;
  5. CREATE PROCEDURE p5 (y pkg. rec_typ) IS 
    BEGIN 
    EXECUTE IMMEDIATE ‘SELECT pdt_name FROM TABLE (:b)’ BULK COLLECT INTO y USING pkg.x;
    END p5;
Correct answer: AC
Question 3
Examine the section of code taken from a PL/SQL program:
  
PLSQL_OPTIMIZE_LEVEL PARAMETER is set to 3. 
Which two statements are true? (Choose two.)
  1. Calls to TESTPROC will always be inlined as it is compiled with PLSQL_OPTIMIZE_LEVEL=3.
  2. Calls to TESTPROC are never inlined in both lines commented as Call1 and Call 2.
  3. Calls to TESTPROC are not inlined in the line commented as Call 1.
  4. Calls to TESTPROC are inlined in both lines commented as Call 1 and Call 2.
  5. Calls to TESTPROC might be inlined in the line commented as Call 2.
Correct answer: AE
Explanation:
Reference: https://docs.oracle.com/cd/E18283_01/appdev.112/e17126/tuning.htm
Reference: https://docs.oracle.com/cd/E18283_01/appdev.112/e17126/tuning.htm
Question 4
Which two blocks of code execute successfully? (Choose two.)
  1. DECLARE 
    SUBTYPE new_one IS BINARY_INTERGER RANGE 0..9; 
    my_val new_one; 
    BEGIN 
    my_val :=0;
    END;
  2. DECLARE 
    SUBTYPE new_string IS VARCHAR2 (5) NOT NULL; 
    my_str_new_string; 
    BEGIN 
    my_str  := ‘abc’;
    END;
  3. DECLARE 
    SUBTYPE new_one IS NUMBER (2, 1); 
    my_val new_one; 
    BEGIN 
    my_val :=12.5;
    END;
  4. DECLARE 
    SUBTYPE new_one IS INTEGER RANGE 1..10 NOT NULL; 
    my_val new_one; 
    BEGIN 
    my_val :=2;
    END;
  5. DECLARE 
    SUBTYPE new_one IS NUMBER (1, 0); 
    my_val new_one; 
    BEGIN 
    my_val := -1;
    END;
Correct answer: AD
Question 5
Examine this code executed as SYS:
  
Examine this code executed as SPIDER and the error message received upon execution:
  
What is the reason for this error?
  1. The procedure needs to be granted the DYNAMIC_TABLE_ROLE role.
  2. The EXECUTE IMMEDIATE clause is not supported with roles.
  3. Privileges granted through roles are never in effect when running definer’s rights procedures.
  4. The user SPIDER needs to be granted the CREATE TABLE privilege and the procedure needs to be granted the DYNAMIC_TABLE_ROLE.
Correct answer: C
Question 6
Which codes executes successfully?
  1. CREATE PACKAGE pkg AS 
    TYPE rec_typ IS RECORD (price NUMBER, inc_pct NUMBER); 
    PROCEDURE calc_price (price_rec IN OUT rec_typ); 
    END pkg; 
    CREATE PACAKGE BODY pkg AS 
    PROCEDURE calc_price (price_rec IN OUT rec_typ) AS 
    BEGIN 
    price_rec.price  := price_rec.price + (price_rec.price * price_rec.inc_pct)/100;
    END calc_price; 
    END pkg; 
    DECLARE 
    1_rec pkg. rec_typ; 
    BEGIN 
    1_rec_price :=100;
    1_rec.inc_pct :=50;
    EXECUTE IMMEDIATE ‘BEGIN pkg. calc_price (:rec); END;’ USING IN OUT 1_rec;
    END;
  2. CREATE PACKAGE pkg AS 
    TYPE rec_typ IS RECORD (price NUMBER, inc_pct NUMBER); 
    END pkg; 
    CREATE PROCEDURE calc_price (price_rec IN OUT pkg. rec_typ) AS 
    BEGIN 
    price_rec.price  := price_rec.price + (price_rec.price * price_rec.inc_pct)/100;
    END 
    DECLARE 
    1_rec pkg.rec_typ; 
    BEGIN 
    EXECUTE IMMEDIATE ‘BEGIN calc_price (:rec); END;’ USING IN OUT 1_rec (100, 50);
    END;
  3. CREATE PACKAGE pkg AS 
    TYPE rec_typ IS RECORD (price NUMBER, inc_pct NUMBER); 
    END pkg; 
    CREATE PROCEDURE calc_price (price_rec IN OUT pkg. rec_typ) AS 
    BEGIN 
    price_rec.price  := price_rec.price + (price_rec.price * price_rec.inc_pct)/100;
    END ; 
    DECLARE 
    1_rec pkg. rec_typ; 
    BEGIN 
    1_rec_price :=100;
    1_rec.inc_pct :=50;
    EXECUTE IMMEDIATE ‘BEGIN calc_price (1_rec); END;’; 
    END;
  4. DECLARE 
    TYPE rec_typ IS RECORD (price NUMBER, inc_pct NUMBER); 
    1_rec rec-typ; 
    PROCEDURE calc_price (price_rec IN OUT rec_typ) AS 
    BEGIN 
    price_rec.price := price-rec.price+ (price_rec.price * price_rec.inc_pct)/100;
    END; 
    BEGIN 
    1_rec_price :=100;
    1_rec.inc_pct :=50;
    EXECUTE IMMEDIATE ‘BEGIN calc_price (:rec); END;’ USING IN OUT 1_rec;
    END;
Correct answer: B
Question 7
  
Examine this code:
  
You want to display the contents of CREATE_LIST. 
Which two lines need to be corrected in the PL/SQL block? (Choose two.)
  1. Line 2
  2. Line 3
  3. Line 5
  4. Line 6
  5. Line 7
Correct answer: AE
Question 8
Examine the following SQL statement:
ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=3; 
What is the result of executing this statement?
  1. The PL/SQL optimize level for some existing PL/SQL units will be changed as an immediate result.
  2. The PL/SQL optimize level for subsequently compiled PL/SQL units will be set to 3 and inlining will be enabled.
  3. The PL/SQL optimize level for subsequently compiled PL/SQL units will be set to 3 and inlining will be disabled.
  4. This statement will fail because PLSQL_OPTIMIZE_LEVEL can only be set at the system level.
Correct answer: C
Question 9
Which data dictionary view contains the list of procedures and functions defined within package specifications that you can execute?
  1. ALL_SOURCE
  2. ALL_DEPENDENCIES
  3. ALL_OBJECTS
  4. ALL_PROCEDURES
  5. ALL_PLSQL_OBJECT_SETTINGS
Correct answer: D
Question 10
Which tablespace is used to store the data collected by PL/Scope?
  1. UNDOTBS1
  2. SYSAUX
  3. SYSTEM
  4. TEMP
  5. USERS
Correct answer: B
Explanation:
Reference: https://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_plscope.htm#BABDGJAF
Reference: https://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_plscope.htm#BABDGJAF
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

You have the opportunity to purchase ProfExam at a 20% reduced price

Get Now!