Download Oracle Database 12c-Advanced PL-SQL.Actualtests.1z0-148.2018-10-06.1e.47q.vcex


Download Exam

File Info

Exam Oracle Database 12c: Advanced PL/SQL
Number 1z0-148
File Name Oracle Database 12c-Advanced PL-SQL.Actualtests.1z0-148.2018-10-06.1e.47q.vcex
Size 2.31 Mb
Posted October 06, 2018
Downloads 87



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
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 2
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 3
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 4
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 5
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.



Question 6
  

Examine this code:

  

You want to display the contents of CREATE_LIST. 
Which two lines need to be corrected in the PL/SQL block?

  • A: Line 2
  • B: Line 3
  • C: Line 5
  • D: Line 6
  • E: Line 7



Question 7
Examine the following SQL statement:
ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=3; 
What is the result of executing this statements? 

  • A: The PL/SQL optimize level for some existing PL/SQL units will be changed as an immediate result.
  • B: The PL/SQL optimize level for subsequently complied PL/SQL units will be set to 3 and inlining will be enabled.
  • C: The PL/SQL optimize level for subsequently compiled PL/SQL units will be set to 3 and inlining will be disabled.
  • D: This statement will fail because PLSQL_OPTIMIZE_LEVEL can only be set at the system level,



Question 8
Which two statements describe actions developers can take to make their application less vulnerable to security attacks?

  • A: Include the AUTHID DEFINER clause in stored program units.
  • B: Do not concatenate unchecked user input into dynamically constructed SQL statements.
  • C: Switch from using DBMS_SQL to EXECUTE IMMEDIATE.
  • D: Include the AUTHID CURRENT_USER clause in stored program units.
  • E: Increase the amount of code that is accessible to users by default.



Question 9
Examine this code:

  

What is the correct statement to get the value of attribute ACCOUNT_MGR after the procedure has been executed?

  • A: SELECT USERENV (‘ACCOUNT_MGR’) FROM dual;
  • B: SELECT SYS_CONTEXT (‘USERENV’, ‘ACCOUNT_MGR’) FROM dual;
  • C: SELECT SYS_CONTEXT (‘ORDER_CTX’, ‘ACCOUNT_MGR’) FROM dual;
  • D: SELECT SYS_CONTEXT (‘ACCOUNT_MGR’, ‘ORDER_CTX’) FROM dual;
  • E: SELECT USERENV (‘ORDER_CTX’) FROM dual;



Question 10
Identify the two correct scenarios where a function can be optimized using the function result cache feature.

  • A: A function which inserts multiple records into a DEPARTMENTS table as part of one-time data setup for an HR application.
  • B: A function which accesses multiple tables and calculates the commission to be given to a sales representative based on the number of products sold by that representative.
  • C: A function which deletes all the records from an EMPLOYEES_AUDIT table based on their LOG_DATE.
  • D: A function which updates the SALARY of all the employees in an EMPLOYEES table by a fixed percentage based on their DESIGNATION.
  • E: A function which calculates the factorial of a given number without accessing any table.








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