PLSQL EXAM
PLSQL EXAM
PLSQL EXAM
PL\SQL
QUESTION 1/61: Which statement can be used in Procedure Builder to modify procedures
QUESTION 2/61: When developing a PL/SQL library, the developer defines variable NUM2
as IN OUT in the ADD_NUMS( ) function. Which of the following statements may happen as a
C. The add_nums( ) function will return errors to the user when run.
Bottom of Form 1
QUESTION 3/61: Which of the following lines in the PL/SQL source code will return an
B. Open the procedure using the Stored Program Unit Editor module
Bottom of Form 1
B. Load PL/SQL code into its processing buffer and compile the code against the
database only.
C. Load PL/SQL code into its processing buffer and compile the code on the client side
only.
D. Load, compile, and run PL/SQL code against the Oracle database.
Bottom of Form 1
ANSWER: B: Since the question said the block was named. Thus,
SQL*Plus will simply load and compile, but not execute, the named PL/SQL block in the flat
file given.
QUESTION 7/61: Which two commands are available in SQL*Plus for editing PL/SQL
QUESTION 8/61: Which two of the following Procedure Builder modules are not usable
unless you are connected to the Oracle database? (Choose two) Top of Form 1
QUESTION 9/61: In which areas of the PL/SQL block must code be placed in order to
Bottom of Form 1
QUESTION 10/61: A procedure declares a user-defined exception but does not raise it
explicitly. Which of the following statements is true about this function? Top of Form 1
Bottom of Form 1
QUESTION 11/61: In which areas of a PL/SQL block must the developer place code for
QUESTION 13/61: The developer is debugging server-side PL/SQL from SQL*Plus. Text
output has been embedded into the procedure, but output still is not appearing. The most
A. TOOL_RES.rfread( )
B. DEBUG.interpret( )
C. TOOL_RES.rf_handle( )
D. DEBUG.break( )
Bottom of Form 1
QUESTION 15/61: Which Oracle-supplied package's procedures are called internally from
QUESTION 16/61: When stepping through PL/SQL execution, which button terminates the
run time and returns the interpreter to its prerun state? Top of Form 1
A. Compile
B. Go
C. Step Through
D. Reset
Bottom of Form 1
ANSWER: D: The Reset button is used to reset the PL/SQL
Interpreter to the state just prior to PL/SQL code execution.
QUESTION 17/61: On compiling a debug trigger, the developer receives an error saying
"identifier must be declared." Which three of the following are potential causes for this error?
Top of Form 1
A. Datatype mismatch between intended variable and function used
Bottom of Form 1
ANSWER: A: The only situation where you don't receive any errors
on compilation is when the datatype expected in the get( ) call doesn't match the datatype
for the variable whose value is being obtained
QUESTION 18/61: The runtime error stack is found in which PL/SQL program module? Top
of Form 1
A. Stored Program Unit Editor
B. Database Trigger Editor
C. PL/SQL Interpreter
D. Object Navigator
Bottom of Form 1
QUESTION 19/61: The developer is using SQL*Plus for debugging. What data dictionary
view contains information about compile-time errors on PL/SQL programs? Top of Form 1
A. USER_ERRORS
B. USER_SOURCE
C. SOURCE#
D. SYS
Bottom of Form 1
QUESTION 20/61: The developer wants to modify the value of a PL/SQL variable from
within a debug trigger. Which procedure or function is most appropriate? Top of Form 1
A. DEBUG.interpret( )
B. DEBUG.setc( )
C. ORA_PROF.create_timer( )
D. TEXT_IO.put_line( )
Bottom of Form 1
QUESTION 21/61: The developer needs to design an application that uses external
procedures written in C. The Oracle-supplied package most appropriate for use in this
QUESTION 22/61: Type declarations for variables referenced in debug triggers are
QUESTION 23/61: A debug trigger has been coded to fire on every breakpoint within a
certain PL/SQL program. The breakpoint will be entered when in relation to the code line on
Bottom of Form 1
QUESTION 24/61: The GET( ) and SET( ) functions are part of which package? Top of Form 1
A. TOOL_ENV
B. ORA_FFI
C. DEBUG
D. LIST
Bottom of Form 1
QUESTION 25/61: Signatures are in use on the Oracle database. Function F1( ) is
compiled containing an INSERT statement on table T1. A NOT NULL constraint is then added
B. Invalid, because timestamps are always used for enforcing object dependencies
Bottom of Form 1
QUESTION 26/61: Which of the following cannot be altered about a function without
QUESTION 27/61: Which two of the following methods specify PL/SQL signatures in effect
Bottom of Form 1
of the following statements is most appropriate for the task? Top of Form 1
Bottom of Form 1
QUESTION 29/61: Function FOO( ) references table FOOBAR via an invalid database link.
If FOOBAR has not been modified, what should the status of FOO( ) be? Top of Form 1
QUESTION 31/61: Procedure PROC1( ) calls function FUNC1( ), which in turn updates data
on the TABLE1 table. The developer drops TABLE1 accidentally. What must be done to rectify
Bottom of Form 1
QUESTION 32/61: What is the effect of revoking SELECT access on table EMPLOYEES from
user JOYCE after granting her EXECUTE privilege on SELECT_EMP( ), a procedure containing
B. Her execution of select_emp( ) will work, but the select will encounter "permission
denied" errors.
C. Her execute privilege on select_emp( ) will be revoked.
Bottom of Form 1
QUESTION 33/61: The best source of timestamp information in the Oracle database is
QUESTION 34/61: Procedure P1( ) calls function F1( ), which contains a SELECT statement
on table T1. All objects are stored on one database. Table T1 is dropped. What happens to
Bottom of Form 1
Bottom of Form 1
QUESTION 36/61: The developer wants to change a parameter's datatype from ROWID to
something else, but doesn't want to invalidate the signature. Which of the following
A. VARCHAR
B. DATE
C. CHARACTER
D. RAW
Bottom of Form 1
Bottom of Form 1
QUESTION 38/61: The developer wants her PL/SQL program unit to issue DDL to create
temporary tables to hold data. Which of the following methods should she use to do it? Top of
Form 1
A. Issue the create table statements directly from the program unit
B. Use DBMS_SESSION to alter the environment such that the PL/SQL program unit
can create tables
C. Use the DBMS_OUTPUT and UTL_FILE packages to issue the create table
statement from the operating system
D. Use DBMS_SQL to generate the create table statement on the fly
Bottom of Form 1
QUESTION 39/61: Which of the following statements are true of a private program unit in
D. Only the package specification will contain reference to the private program unit.
Bottom of Form 1
A. DBMS_ALERT.waitany( )
B. DBMS_PIPE.create_pipe( )
C. DBMS_SESSION.describe_procedure( )
D. DBMS_SHARED_POOL.keep( )
Bottom of Form 1
B. When developers and users should be able to access information on the pipe
C. When only the owner of the pipe should have access to information on that pipe
QUESTION 42/61: Which of the following are good uses of comments in packages?
Bottom of Form 1
ANSWER: B, C: Good comment usage is demonstrated by Oracle
server-supplied packages, where comments on general program unit usage, parameter
passing options, and other general items on using the package appear in the package
specification.
QUESTION 43/61: The term that best describes a situation where several procedures in a
package all have the same name but accept parameters of different datatypes is: Top of Form 1
A. Instantiating
B. Overloading
C. Datatyping
D. Compilation error
Bottom of Form 1
QUESTION 44/61: Which Oracle server-supplied program unit may cause locking issues if
A. DBMS_ALERT.waitany( )
B. DBMS_PIPE.create_pipe( )
C. DBMS_SESSION.describe_procedure( )
D. DBMS_SHARED_POOL.keep( )
Bottom of Form 1
QUESTION 45/61: Which of the following situations will cause a package specification to
QUESTION 46/61: The user of a program unit has received the following error: "ORA-
04068: existing package state has been discarded." The next step the developer should take
QUESTION 47/61: After sending a message across a pipe, which of the following
procedures would a developer use to retrieve the message from the pipe? Top of Form 1
A. pack_message( )
B. send_message( )
C. receive_message( )
D. unpack_message( )
Bottom of Form 1
ANSWER: C: Reading the message off the pipe into your local buffer
is done with receive_message( ) while unpack_message( ) removes if from the local buffer,
allowing you to work with it.
QUESTION 48/61: Which two Oracle server-supplied packages approximate the use of the
QUESTION 49/61: The datatype in a program unit specification in the package body does
not match its counterpart in the specification. Which of the following events best describes
D. The package body will compile fine, but the package specification will fail.
Bottom of Form 1
QUESTION 50/61: The developer finds a logic error in a program unit called by other
programs in several different packages. The developer corrects the error and recompiles the
package. Assuming no calls to the referenced program were made, what are the effects of
Bottom of Form 1
QUESTION 51/61: The developer of an application wants the application to acquire table
locks in order to execute its processing. Which of the following methods for acquiring that
B. Issuing select for update statements where the select statement has a where
clause
C. Issuing calls to program units in DBMS_LOCK
Bottom of Form 1
QUESTION 52/61: To achieve better performance on row triggers, you should: Top of Form 1
Bottom of Form 1
ANSWER: A: Processing the trigger execution after the triggering
statement allows Oracle to perform the work necessary with fewer logical reads of data,
thereby reducing overall processing time for the trigger and the triggering statement.
Answers in Depth...
QUESTION 53/61: The developer issues the following statement: CREATE OR REPLACE
TRIGGER soccer_fans_snacks_02 BEFORE DELETE ON SOCCER_FANS FOR EACH ROW BEGIN
DELETE FROM soccer_fans_snacks WHERE fan_id = :old.fan_id; END;. Which of the following
A. An update trigger that fires before Oracle processes the triggering statement
B. An insert trigger that fires after Oracle processes the triggering statement
C. An insert trigger that fires after Oracle processes the triggering statement
D. A delete trigger that fires before Oracle processes the triggering statement
Bottom of Form 1
QUESTION 54/61: The developer issues the following statement: CREATE OR REPLACE
TRIGGER soccer_fans_snacks_02 BEFORE DELETE ON SOCCER_FANS BEGIN DELETE FROM
soccer_fans_snacks WHERE fan_id = :old.fan_id; END;. Why will trigger creation fail? Top of
Form 1
A. The row trigger does not properly reference the old value in FAN_ID.
D. The row trigger does not properly define the associated table.
Bottom of Form 1
QUESTION 55/61: You define a trigger that contains the clause AFTER UPDATE OR DELETE
ON SOCCER_FAN_SNACKS. Which two of the following keywords may be useful in your
trigger source code to distinguish what should run, and when? Top of Form 1
A. inserting
B. updating
C. deleting
D. truncating
Bottom of Form 1
QUESTION 56/61: Table SOCCER_FAN_SEAT contains two columns: FAN and SEAT_NUM.
A trigger is created in this table, whose triggering statement definition is AFTER UPDATE OF
SEAT_NUM ON SOCCER_FAN_SEAT. You issue an UPDATE statement that changes column
FAN only. Which of the following best describes what happens next? Top of Form 1
QUESTION 57/61: Which of the following trigger types will be impacted by constraining
QUESTION 58/61: The developer issues the following statement: CREATE OR REPLACE
TRIGGER soccer_fans_snacks_02 BEFORE DELETE ON SOCCER_FANS FOR EACH ROW BEGIN
DELETE FROM soccer_fans_snacks WHERE fan_id = :old.fan_id; END;. Which of the following
A. execute on SOCCER_FANS
B. execute on SOCCER_FANS_SNACKS_02
C. delete on SOCCER_FANS_SNACKS_02
D. delete on SOCCER_FANS
Bottom of Form 1
QUESTION 59/61: The SOCCER_FANS table has a trigger associated with it that inserts
data into SOCCER_FANS_SNACKS whenever rows are inserted into SOCCER_FANS. A foreign
key constraint exists between FAN_ID on SOCCER_FANS and SOCCER_FANS_SNACKS. What
Bottom of Form 1
QUESTION 61/61: The developer issues the following statement: CREATE OR REPLACE
TRIGGER soccer_fans_snacks_02 BEFORE DELETE ON SOCCER_FANS FOR EACH ROW BEGIN
DELETE FROM soccer_fans_snacks WHERE fan_id = :prechange.fan_id; END;. Why does the
B. The row trigger does not define prechange as the referencing keyword for old
column values.
C. Row triggers cannot process before the triggering statement.
Bottom of Form 1