Download Oracle Database 12c-Advanced PL-SQL.selftestengine.1z0-148.2020-02-07.1e.49q.vcex


Download Exam

File Info

Exam Oracle Database 12c: Advanced PL/SQL
Number 1z0-148
File Name Oracle Database 12c-Advanced PL-SQL.selftestengine.1z0-148.2020-02-07.1e.49q.vcex
Size 2.02 Mb
Posted February 07, 2020
Downloads 43



How to open VCEX & EXAM Files?

Files with VCEX & EXAM extensions can be opened by ProfExam Simulator.

Purchase
Coupon: EXAMFILESCOM

Coupon: EXAMFILESCOM
With 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?

  • A: BEGIN 
    OPEN cursor3 FOR SELECT * FROM students; 
    cursor1 :=cursor3;
    END;
  • B: BEGIN 
    OPEN stcur; 
    cursor1 :=stcur;
    END;
  • C: BEGIN 
    OPEN cursor1 FOR SELECT * FROM students; 
    stcur :=cursor1;
    END;
  • D: BEGIN 
    OPEN stcur; 
    cursor3 :=stcur;
    END;
  • E: BEGIN 
    OPEN cursor1 FOR SELECT * FROM students; 
    cursor2 :=cursor1;
    END;



Question 2
Examine the code:

  

Which two subprograms will be created successfully?

  • A: 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;
  • B: 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;
  • C: CREATE PROCEDURE p2 (v IN OUT VARCHAR2) IS 
    BEGIN 
    EXECUTE IMMEDIATE ‘SELECT f (:b) FROM DUAL’ INTO v USING pkg.x;
    END p2;
  • D: CREATE FUNCTION p3 RETURN pkg. tab_typ IS 
    BEGIN 
    EXECUTE IMMEDIATE ‘SELECT f (:b) FROM DUAL’ INTO pkg.x;
    END p3;
  • E: 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;



Question 3
Which two statements are true regarding edition-based redefinition (EBR)?

  • A: There is no default edition defined in the database.
  • B: EBR does not let you upgrade the database components of an application while in use.
  • C: You never use EBR to copy the database objects and redefine the copied objects in isolation.
  • D: Editions are non-schema objects.
  • E: When you change an editioned object, all of its dependents remain valid.
  • F: Tables are not editionable objects.



Question 4
Which two blocks of code execute successfully?

  • A: DECLARE 
    SUBTYPE new_one IS BINARY_INTERGER RANGE 0..9; 
    my_val new_one; 
    BEGIN 
    my_val :=0;
    END;
  • B: DECLARE 
    SUBTYPE new_string IS VARCHAR2 (5) NOT NULL; 
    my_str_new_string; 
    BEGIN 
    my_str  := ‘abc’;
    END;
  • C: DECLARE 
    SUBTYPE new_one IS NUMBER (2, 1); 
    my_val new_one; 
    BEGIN 
    my_val :=12.5;
    END;
  • D: DECLARE 
    SUBTYPE new_one IS INTEGER RANGE 1..10 NOT NULL; 
    my_val new_one; 
    BEGIN 
    my_val :=2;
    END;
  • E: DECLARE 
    SUBTYPE new_one IS NUMBER (1, 0); 
    my_val new_one; 
    BEGIN 
    my_val := -1;
    END;



Question 5
Which statement is correct about DBMS_LOB.SETOPTIONS and DBMS_LOB.GETOPTIONS for SecureFiles?

  • A: DBMS_LOB.GETOPTIONS can only be used for BLOB data types.
  • B: DBMS_LOB.SETOPTIONS can perform operations on individual SecureFiles but not an entire column.
  • C: DBMS_LOB. SETOPTIONS can set option types COMPRESS, DUPLICATE, and ENCRYPT.
  • D: If a table was not created with compression specified in the store as securefile clause then DBMS_LOB.SETOPTIONS can be used to enable it later.



Question 6
You are designing and developing a complex database application built using many dynamic SQL statements. Which option could expose your code to SQL injection attacks?

  • A: Using bind variables instead of directly concatenating parameters into dynamic SQL statements
  • B: Using automated tools to generate code
  • C: Not validating parameters which are concatenated into dynamic SQL statements
  • D: Validating parameters before concatenating them into dynamic SQL statements
  • E: Having excess database privileges



Question 7
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?

  • A: The procedure needs to be granted the DYNAMIC_TABLE_ROLE role.
  • B: The EXECUTE IMMEDIATE clause is not supported with roles.
  • C: Privileges granted through roles are never in effect when running definer’s rights procedures.
  • D: The user SPIDER needs to be granted the CREATE TABLE privilege and the procedure needs to be granted the DYNAMIC_TABLE_ROLE.



Question 8
Which codes executes successfully?

  • A: 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;
  • B: 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;
  • C: 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;
  • D: 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;



Question 9
Examine this function header:
FUNCTION calc_new_sal (emp_id NUMBER) RETURN NUMBER; 
You want to ensure that whenever this PL/SQL function is invoked with the same parameter value across active sessions, the result is not recomputed. 
If a DML statement is modifying a table which this function depends upon, the function result must be recomputed at that point in time for all sessions calling this function. 
Which two actions should you perform?

  • A: Ensure RESULT_CACHE_MAX_SIZE is greater than 0.
  • B: Enable the result cache by using DBMS_RESULT_CACHE.BYPASS (FALSE).
  • C: Add the deterministic clause to the function definition.
  • D: Add the RELIES_ON clause to the function definition.
  • E: Add the RESULT_CACHE clause to the function definition.



Question 10
Examine this block:

  

Which two will be correct after line 5?

  • A: va. LAST and va. LIMIT will return the same value.
  • B: va. LAST and va. COUNT will return the same value.
  • C: va. LIMIT and va. COUNT will return the same value.
  • D: va. LIMIT and va. NEXT (199) will return the same value.
  • E: va. LAST will return 200.
  • F: va. NEXT (199) will return NULL.








ProfExam
PROFEXAM WITH A 20% DISCOUNT

You can buy ProfExam with a 20% discount..

Get Now!


HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen



HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset