Exam Code: 1Z0-146 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Oracle 11g: Advanced PL/SQL
Certification Provider: Oracle
Free Today! Guaranteed Training- Pass 1Z0-146 Exam.
2021 Jun 1Z0-146 Study Guide Questions:
Q61. 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:
SELECT description INTO clob_loc FROM test_details WHERE test_id = 12 ;
buf := '0123456789'
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.
Q62. 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
Q63. View the Exhibit to examine a Java source file.
You have the corresponding Java class file and you execute the command as follows:
SQL> CREATE OR REPLACE PROCEDURE ccformat
(x IN OUT VARCHAR2)
AS LANGUAGE JAVA
Which statement is true about the command?
A. It loads the Java class method into Oracle Database and publishes it.
B. It publishes the Java class method, but the CCFORMAT PL/SQL procedure fails when it is executed.
C. It creates the CCFORMAT PL/SQL subprogram without publishing, which can be used to invoke the Java class method.
D. It publishes the Java class method and the CCFORMAT PL/SQL procedure invokes the Java class method when it is executed.
Avant-garde 1Z0-146 sample question:
Q64. Examine the structure of the PRINT_MEDIA table: Name Null? Type
ADVT_ID NUMBER ADVT_SOURCE CLOB Examine the following PL/SQL block:
offset NUMBER :=1;
buffer :='This is the second line of a new document'
amount := LENGTH(buffer);
SELECT advt_source INTO lobloc FROM print_media WHERE advt_id=2 FOR UPDATE;
What must be the value in the ADVT_SOURCE column for the above code to execute
B. an empty locator
C. a non-NULL value
D. either null or any non-NULL values
Q65. Identify two strategies against SQL injection. (Choose two.)
A. Using parameterized queries with bind arguments.
B. Use subprograms that are run with the definer's right.
C. Use RESTRICT_REFERENCE clauses in functions that use dynamic SQLs.
D. Validate user inputs to functions that use dynamic SQLs built with concatenated values.
Q66. You created an application context successfully. The user OE was granted the EXECUTE privilege on the DBMS_SESSION package. The user receives this error while setting the value for an attribute within the context: SQL> EXECUTE DBMS_SESSION.SET_CONTEXT('SALES_ORDERS_CTX','ACCOUNT_MGR','OE'); BEGIN DBMS_SESSION.SET_CONTEXT('SALES_ORDERS_CTX','ACCOUNT_MGR','OE'); END; * ERROR at line 1: ORA-01031: insufficient privileges ORA-06512: at "SYS.DBMS_SESSION", line 94
ORA-06512: at line 1
What is the reason for this error?
A. The context was created with a package name in the USING clause.
B. The attribute can be set only in the package associated with the context.
C. The package associated with the context did not exist at the time of creation of the context.
D. The value for an attribute of a user-defined context can be set only by the ALTER SESSION command.
High value 1Z0-146 interactive bootcamp:
Q67. 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.
Q68. View the Exhibit and examine the structure of the EMPLOYEES table.
Examine the following PL/SQL block:
IS VARRAY(2) OF employees.employee_id%TYPE NOT NULL;
v_employees EmpList := EmpList(); BEGIN
v_employees(1) := 30;
Which statement is true about the outcome on executing the above PL/SQL block?
A. It executes successfully and displays the value 2.
B. It executes successfully and displays the value 0.
C. It generates an error because EXTEND cannot be used for varrays.
D. It generates an error because the declaration of the varray is not valid.
Q69. DATA_FILES is a directory object that contains the DETAILS.TXT text file.
You have the required permissions to access the directory object.
You create a table using the following command:
CREATE TABLE clob_tab(col2 CLOB);
View the Exhibit and examine the PL/SQL block that you execute for loading the external text file into the table that currently has no rows. The PL/SQL block results in an error.
What correction must be done to ensure the PL/SQL block executes successfully?
A. The L_OUT variable must be initialized to an empty locator.
B. The L_OUT variable has to be declared as a temporary LOB. C. The A_CLOB variable has to be declared as a temporary LOB.
D. The clause RETURNING col2 INTO a_clob should be added to the INSERT statement to correctly initialize the locator.
Q70. Which two statements are true about BFILES? (Choose two.)
A. BFILES support only sequential reads.
B. BFILES can be used as attributes in an object type.
C. When LOB is deleted, the corresponding physical file is automatically deleted.
D. The RMAN backup automatically backs up the BFILE locators and the corresponding physical files.
E. The physical file corresponding to a BFILE locator must reside on the file system that is accessible from the server where the database exists.