Oracle 11g: Advanced PL/SQL v5.0 (1z0-146)

Page:    1 / 10   
Total 136 questions

In which two situations is the body of a result-cached function executed? (Choose two.)

  • A. if the memory allocated for the result cache is increased
  • B. if a session on this database instance invokes the function with the same parameter values
  • C. if the first time a session on this database instance invokes the function with a parameter value
  • D. if a session executes a data manipulation language (DML) statement on a table or view that was specified in the RELIES_ON clause of a result-cached function


Answer : C,D

Identify the component of the PL/SQL hierarchical profiler that uploads the result of profiling into database tables.

  • A. the trace file component
  • B. the analyzer component
  • C. the shared library component
  • D. the data collection component


Answer : B

Examine the code snippet from the declarative section of a PL/SQL block:

DECLARE -
TYPE va1 IS VARRAY(10) OF VARCHAR2(20);
SUBTYPE scale IS NUMBER(1,0);
TYPE tb1 IS TABLE OF departments.department_name%TYPE INDEX BY departments.department_id%TYPE;
TYPE tb2 IS TABLE OF va1 INDEX BY PLS_INTEGER;
TYPE tb3 IS TABLE OF scale INDEX BY VARCHAR2(10);
TYPE tb4 IS TABLE OF DATE INDEX BY DATE;
TYPE tb5 IS TABLE OF NUMBER INDEX BY CHAR(2);
....
Which of the above are valid definitions for associative arrays? (Choose all that apply.)

  • A. tb1
  • B. tb2
  • C. tb3
  • D. tb4
  • E. tb5


Answer : B,C

Examine the structure of the TEST_DETAILS table:
Name Null? Type
------------------- -------- -------------
TEST_ID NUMBER

DESCRIPTION CLOB -
DESCRIPTION data was entered earlier and saved for TEST_ID 12.
You execute this PL/SQL block to add data to the end of the existing data in the
DESCRIPTION column for TEST_ID 12:

DECLARE -
clob_loc CLOB;
buf CHAR(12);

BEGIN -
SELECT description INTO clob_loc FROM test_details WHERE test_id = 12 ; buf := '0123456789';
DBMS_LOB.WRITEAPPEND(clob_loc,DBMS_LOB.GETLENGTH(buf), buf);
COMMIT;
END;
/
It generates an error on execution.
What correction should you do to achieve the required result?

  • A. WRITEAPPEND must be replaced with APPEND.
  • B. The BUF variable data type must be changed to CLOB.
  • C. FOR UPDATE must be added to the SELECT statement.
  • D. The GETLENGTH routine must be replaced with the LENGTH built-in function in WRITEAPPEND.


Answer : C

Which two statements correctly describe the features of SecureFiles? (Choose two.)

  • A. Compression is performed only on the server side and enables random reads and writes to LOB data.
  • B. Deduplication stores identical data, which occurs in a LOB column in each row, as a single copy within the LOB.
  • C. Compression can be performed on the client side and it enables random and sequential reads and writes to LOB data.
  • D. Deduplication stores identical data occurring two or more times in the same LOB column as a single copy for the table.


Answer : A,D

You issue the following command to create the PRINT_MEDIA table.

CREATE TABLE print_media -
(product_id NUMBER(3),
ad_sourcetext CLOB,
ad_photo BLOB);
Evaluate the following INSERT statements:
INSERT INTO print_media VALUES (1, empty_clob(),empty_blob());
INSERT INTO print_media VALUES (2,'This is a One Line Story',null);
INSERT INTO print_media VALUES (3,'This is another One Line Story',empty_blob());
INSERT INTO print_media VALUES (4,empty_clob(),to_blob('This is new Story'));
Which of the above INSERT statements are valid?

  • A. Only the first statement is valid.
  • B. All the statements are valid.
  • C. Only the first and fourth statements are valid.
  • D. Only the first and second statements are valid.
  • E. Only the first, second and third statements are valid.


Answer : E

Which two statements are true about the inlining of PL/SQL subprograms? (Choose two.)

  • A. Only local subroutines can be inlined.
  • B. Inlining always reduces the execution time for a PL/SQL program unit.
  • C. PLSQL_OPTIMIZE_LEVEL must be set to a value greater than or equal to 2.
  • D. The PL/SQL programs that make use of relatively large helper subroutines are good candidates for inlining.


Answer : A,C

View Exhibit1 and examine the structure of the EMPLOYEES table.
View Exhibit2 and examine the code in the PL/SQL block.
The PL/SQL block fails to execute.
What could be the reason?
A. Nested tables cannot be returned by a function.
B. The NEWNAMES nested table has not been initialized.
C. The assignment operator cannot be used to transfer all the element values from
GROUP1 to GROUP2.
D. The third element of OLDNAMES cannot be assigned to the third element of GROUP1 because they are of inconsistent data types.
E. LAST_NAME values cannot be assigned to the V_LAST_NAMES nested table because local collection types are not allowed in SQL statements.



Answer : E Topic 1, B B

Which two statements are true about the usage of the
DBMS_DESCRIBE.DESCRIBE_PROCEDURE procedure? (Choose two.)

  • A. You can describe remote objects.
  • B. You can describe anonymous PL/SQL blocks.
  • C. You can describe a stored procedure, stored function, packaged procedure, or packaged function.
  • D. You can obtain information about the position, name, and data type of the arguments of a procedure.


Answer : C,D

You executed the following command to alter the session parameter:
SQL> ALTER SESSION SET PLSCOPE_SETTINGS = 'IDENTIFIERS:ALL';
Which two statements are true in this scenario? (Choose two.)

  • A. If the SYSAUX tablespace is unavailable, and you compile a program unit, PL/Scope does not collect data for the compiled object.
  • B. All the identifiers declared in compiled program units before altering the parameter settings appear in the *_IDENTIFIER static data dictionary views.
  • C. All the identifiers declared in compiled program units before altering the parameter settings do not appear in the *_IDENTIFIER static data dictionary views.
  • D. If the SYSAUX tablespace is unavailable, and you compile a program unit, PL/Scope collects data for the compiled object and stores it in the SYSTEM tablespace.


Answer : A,C

Examine the following structure:

SQL> DESCRIBE user_identifiers -
Name Null? Type
----------------------------------------- -------- -----------------------
NAME VARCHAR2(30)
SIGNATURE VARCHAR2(32)
TYPE VARCHAR2(18)
OBJECT_NAME NOT NULL VARCHAR2(30)
OBJECT_TYPE VARCHAR2(13)
USAGE VARCHAR2(11)
USAGE_ID NUMBER
LINE NUMBER
COL NUMBER
USAGE_CONTEXT_ID NUMBER
Identify two scenarios in which information is stored in the USAGE column. (Choose two.)

  • A. an assignment made to VARIABLE
  • B. declaration of a variable or formal parameter
  • C. an identifier passed to a subprogram in IN OUT mode
  • D. execution of the GOTO statement or raise of an exception


Answer : A,B

Examine the following settings for a session:

PLSQL_CODE_TYPE = NATIVE -
View the Exhibit and examine the PL/SQL code.
You compile the program with the following attributes:
SQL> ALTER PROCEDURE proc1 COMPILE PLSQL_OPTIMIZE_LEVEL = 1;
Which statement is true about the execution of the PROC1 procedure in this scenario?

  • A. The FUNC1 function would be called inline because PRAGMA INLINE forces a specific call to be inlined.
  • B. The FUNC1 function would be inlined because the value set for the PLSQL_CODE_TYPE parameter is set to NATIVE.
  • C. The FUNC1 function would be called inline irrespective of the value set for the PLSQL_OPTIMIZE_LEVEL parameter.
  • D. The FUNC1 function would not be called inline because the value for the PLSQL_OPTIMIZE_LEVEL parameter is set to a lower value.


Answer : D

The following command is executed to start tracing in a user session:

SQL> EXECUTE -
DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ENABLED_EXCEPTIONS)
;
Which statement is true about the effect of the command?

  • A. It allows tracing of exceptions raised by all subprograms executed in the session.
  • B. It allows tracing of user-defined exceptions raised by all subprograms executed in the session.
  • C. It allows tracing of system-defined exceptions raised by all subprograms executed in the session.
  • D. It allows tracing of exceptions raised by subprograms compiled with the DEBUG option and executed in the session.


Answer : D

You executed this command to gather information about the memory allocation for storing query results:
SQL> execute dbms_result_cache.memory_report
View the Exhibit and examine the output for the execution of the
DBMS_RESULT_CACHE.MEMORY_REPORT procedure.
Which two statements are true about the output in the Exhibit? (Choose two.)

  • A. In total, four blocks are used by the result cache.
  • B. Currently 52 KB is allocated to the result cache.
  • C. Currently 32 KB is allocated to the result cache.
  • D. The result cache can be increased by 65628 bytes.


Answer : C,D

The user OE is working on an application that needs to call an external C program multiple times in a single session. However, the extproc.exe file on the server gets accidentally deleted after the OE user connected and made calls to the external C program. Which statement is true about the current session by the OE user?

  • A. The session can continue calling the external C program.
  • B. The session can call the external C program after republishing it.
  • C. The session receives an error for the next call to the external C program.
  • D. The session terminates during the subsequent call to the external C program.


Answer : A

Page:    1 / 10   
Total 136 questions