Which statement is true about the COMPILE_CODE procedure?

View the Exhibit and examine the code:


Which statement is true about the COMPILE_CODE procedure?
A. It gives an error in line 6.
B. It gives an error in line 8.
C. It gives an error in line 5.
D. It executes successfully, but displays a warning about the unreachable code when used for the PROC1 procedure.
E. It executes successfully, but a warning about the unreachable code is not displayed when used for the PROC1 procedure.

Download Printable PDF. VALID exam to help you PASS.

4 thoughts on “Which statement is true about the COMPILE_CODE procedure?

  1. if you notice that unreachable code that means PLW-06003 that belong to info range not performance range so the code will execute successfully without warning so E is the correct answer

  2. It should fail on line 7 as PROC1 is procedure, not package, so it can’t be compiled with COMPILE_CODE. But as there is no such option in answers, assume it’s a typo.

    exec dbms_warning.set_warning_setting_string(‘DISABLE:ALL’,’SESSION’);

    create or replace procedure compile_code(p_pkg_name varchar2) is
    v_warn_value varchar2(200);
    v_compile_stmt varchar(200):=’alter package ‘|| p_pkg_name ||’ COMPILE’;
    begin
    v_warn_value:=dbms_warning.get_warning_setting_string;
    dbms_warning.add_warning_setting_cat(‘all’,’enable’,’session’);
    execute immediate v_compile_stmt;
    dbms_warning.set_warning_setting_string(v_warn_value,’session’);
    end;
    /

    exec compile_code(“PROC1”);

    ERROR at line 1:
    ORA-06550: line 1, column 21:
    PLS-00222: no function with name ‘PROC1’ exists in this scope
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.