nerdexam
Oracle

1Z0-146 · Question #98

Examine the following error: SQL> DECLARE v_runid NUMBER; BEGIN v_runid := DBMS_HPROF.ANALYZE (LOCATION => 'PROFILE_DATA', FILENAME => 'pd_cc_pkg.txt'); DBMS_OUTPUT.PUT_LINE('Run ID: ' || v_runid)…

The correct answer is C. Run the dbmshptab.sql script located at ORACLE_HOME\RDBMS\ADMIN. To create the hierarchical profiler tables in Table 9-3 and the other data structures required for persistently storing profile data, follow these steps: Run the script dbmshptab.sql (located in the directory rdbms/admin). This script creates both the hierarchical profiler…

Debugging and Profiling PL/SQL Code

Question

Examine the following error:

SQL> DECLARE v_runid NUMBER; BEGIN v_runid := DBMS_HPROF.ANALYZE (LOCATION => 'PROFILE_DATA', FILENAME => 'pd_cc_pkg.txt'); DBMS_OUTPUT.PUT_LINE('Run ID: ' || v_runid); END; DECLARE * ERROR at line 1:

ORA-00942: table or view does not exist ORA-06512: at "SYS.DBMS_HPROF", line 299 ORA-06512: at line 4 What would you do to execute the above block successfully?

Options

  • AStart the PL/SQL profiler before executing the block.
  • BRun the tracetab.sql script located at ORACLE_HOME\RDBMS\ADMIN.
  • CRun the dbmshptab.sql script located at ORACLE_HOME\RDBMS\ADMIN.
  • DGrant READ and WRITE privileges to the current user on the PROFILE_DATA directory object.

How the community answered

(22 responses)
  • A
    5% (1)
  • B
    9% (2)
  • C
    77% (17)
  • D
    9% (2)

Explanation

To create the hierarchical profiler tables in Table 9-3 and the other data structures required for persistently storing profile data, follow these steps: Run the script dbmshptab.sql (located in the directory rdbms/admin). This script creates both the hierarchical profiler tables in Table 9-3 and the other data structures required for persistently storing profile data. Running the script dbmshptab.sql drops any previously created hierarchical profiler tables. Ensure that you have the following privileges: EXECUTE privilege on the DBMS_HPROF package READ privilege on the directory that DBMS_HPROF.analyze specifies

Topics

#DBMS_HPROF#hierarchical profiler#dbmshptab.sql#profiler tables

Community Discussion

No community discussion yet for this question.

Full 1Z0-146 Practice