Section 14
A
change in a remote referenced subprogram is automatically recorded as invalid
if its base object changes and that new status is relayed to the dependent
object's status and automatically marked as invalid. True or False?
True
False
(*)
In this scenario, the following
status is given for each procedure:
- Procedure A is local and has a time stamp of 10 AM
- Procedure B is remote and has a local and remote time
stamp of 10:30 AM
In Timestamp Mode, Procedure A, which is dependent on
Procedure B, will execute successfully at 11 AM. True or False?
True
(*)
False
A remote dependency is when a
dependent object resides ________________.
In a
local database
In a
remote database (*)
In the
same object
Procedure B has the ZERO_DIVIDE
pre-defined exception added to its EXCEPTION section. It is compiled
successfully. In Timestamp Mode, Procedure A, which is dependent on remote
Procedure B, will compile and execute successfully. True or False?
True
False
(*)
In Signature Mode, a compiled
procedure would be invalidated if its dependent procedure has a parameter data
type change from NUMBER to _________________.
DECIMAL
BINARY_INTEGER
VARCHAR2
(*)
INTEGER
Which
of the following will display only the number of invalid package bodies in your
schema?
SELECT
COUNT(*) FROM user_objects
WHERE object_type = 'PACKAGE BODY'
AND status = 'INVALID';
(*)
SELECT
COUNT(*) FROM user_dependencies
WHERE type = 'PACKAGE BODY'
AND status = 'INVALID';
SELECT
COUNT(*) FROM user_objects
WHERE object_type LIKE 'PACKAGE%'
AND status = 'INVALID';
SELECT
COUNT(*) FROM user_packages
WHERE status = 'INVALID';
Procedure get_depts has been
marked invalid because one of the objects it references has been altered. Which
of the following statements are true? (Choose two.)
(Choose
all correct answers)
The
procedure will be recompiled automatically the next time it is invoked. The
recompilation will always be successful.
The
procedure can be recompiled manually by:
ALTER PROCEDURE get_depts RECOMPILE;
The
procedure does not need to be recompiled.
The
procedure will be recompiled automatically the next time it is invoked. The
recompilation may or may not be successful.
(*)
The
procedure can be recompiled manually by:
ALTER PROCEDURE get_depts COMPILE;
(*)
Which of the following will NOT
help to minimize dependency failures? (Choose two.)
(Choose
all correct answers)
SELECTing
a list of column names instead of using SELECT * (*)
Declaring
records using the %ROWTYPE attribute
Including
a column list with INSERT statements
Declaring
scalar variables using the %TYPE attribute
Declaring
scalar variables with NOT NULL if the corresponding table column has a NOT NULL
constraint (*)
Which of the following
techniques will make it more likely that an invalidated PL/SQL subprogram will
recompile successfully? (Choose two.)
(Choose
all correct answers)
Declaring
record structures using %ROWTYPE (*)
Using a
cursor FOR loop instead of opening and closing the cursor explicitly
SELECTing
a list of column-names instead of using SELECT *
Including
a column list with INSERT statements (*)
A SELECT from DEPTREE produced
the following output.
>NESTED_LEVEL >TYPE >NAME
>0 >TABLE >EMPLOYEES
>1 >VIEW >EMP_VW
>2 >PROCEDURE >ADD_EMP
>1 >PROCEDURE >QUERY_EMP
What dependencies does this show? (Choose three.)
(Choose
all correct answers)
QUERY_EMP
is directly dependent on EMPLOYEES (*)
EMP_VW
is directly dependent on EMPLOYEES (*)
ADD_EMP
is directly dependent on EMPLOYEES
QUERY_EMP
is directly dependent on ADD_EMP
ADD_EMP
is directly dependent on EMP_VW (*)
Which
of the following will display dependency information which has been generated
by executing the DEPTREE_FILL procedure? (Choose two.)
(Choose
all correct answers)
The
USER_DEPENDENCIES view
The DEPTREE
view (*)
The
DISPLAY_DEPTREE view
The
UTLDTREE script
The
IDEPTREE view (*)
Package EMPPACK contains a public
procedure GET_EMP, which contains a reference to the EMPLOYEES table. Procedure
CALL_EMP invokes EMPPACK.GET_EMP. The following SQL statement is executed:
ALTER TABLE employees ADD (gender CHAR(1));
Which one of the following statements is true?
Nothing
is invalidated because the PL/SQL code does not reference the GENDER column.
EMPPACK.GET_EMP
is invalidated, but other procedures in EMPPACK remain valid.
The
specification and body of EMPPACK are invalidated, but CALL_EMP remains valid.
The
body of EMPPACK is invalidated, but the specification remains valid. (*)
The IDEPTREE view shows
dependencies by indenting the lines of output instead of by using a
NESTED_LEVEL column. True or False?
True
(*)
False
Examine the following code:
CREATE FUNCTION deptfunc
RETURN NUMBER IS
v_count NUMBER(6);
BEGIN
SELECT COUNT(*)
INTO v_count FROM departments;
RETURN v_count;
END;
Which of the following will display the dependency between
DEPTFUNC and DEPARTMENTS?
SELECT
name, type, referenced_name, referenced_type
FROM user_dependencies
WHERE referenced_name = 'DEPARTMENTS'
AND referenced_type = 'TABLE';
(*)
SELECT
name, type, referenced_name, referenced_type
FROM user_dependencies
WHERE name = 'DEPARTMENTS'
AND type = 'TABLE';
SELECT
object_name, object_type
FROM user_objects
WHERE object_name IN ('DEPARTMENTS','DEPTFUNC')
AND referenced = 'YES';
SELECT
name, type
FROM user_dependencies
WHERE name IN ('DEPTFUNC','DEPARTMENTS');
Package emp_pack contains two
public procedures: get_emps and upd_emps. A separate procedure emp_proc invokes
emp.pack.get_emps. The upd_emps package body code is now altered, and the
package body (but not the package specification) is recreated.
emp_proc will be marked invalid and needs to be recompiled.
True or False?
True
False
(*)
YquasliOlenko1994 Sean Sabando link
ReplyDeletecaugethairui