Sie sind auf Seite 1von 11

Test:..Semester..2..Final..

Exam
1... Native..compilation..always..runs..faster;..therefore..SQL..statements..in.
.PL/SQ
L..will..always..run..faster,..also...True..or..False?.. Mark..for..Review..
(1)..Points
True
False..(*)
Correct Correct
2... Identify..examples..of..benefits..of..using..PLSQL_OPTIMIZE_LE
VEL...(Choose..three).. Mark..for..Review..
(1)..Points
(Choose..all..correct..answers)
Modify..source..code..to..optimize..frequently-used..elements..at..the..top.
Control..what..PL/SQL..does..with..useless..code...(*)
Backward..compatible..with..previous..versions..of..the..Oracle..database...(*)
Separating..compiled..code..so..that..separate..units..may..be..repeated..as..ne
ede
d.
Copy..compiled..code..from..one..subprogram..into..another..subprogram...(*)
Correct Correct
3... Native..machine..code..PL/SQL..will..always..execute..faster..th
an..bytecode..PL/SQL..because..it..need..not..be..interpreted..at..run..time...T
rue..or..False
?.. Mark..for..Review..
(1)..Points
True..(*)
False
Correct Correct
4... Identify..some..benefits..of..using..conditional..compilation.
..(Choose..two).. Mark..for..Review..
(1)..Points
(Choose..all..correct..answers)
Use..new..features..with..the..latest..database..release..and..disable..them..wi
th..
older..database..versions..(*)
Speed..up..the..compilation..time..of..a..lengthy..PL/SQL..subprogram.
Determine..initialization..values..during..start..up..of..a..database..session.
Activate..debugging..or..tracing..statements..in..the..development..environment.
.
(*)
Correct Correct
5... In..the..following..example,..what..statement..belongs..in..Line
..A?
ALTER..SESSION..SET..PLSQL_CCFLAGS..=..'debug:true';
CREATE..OR..REPLACE..PROCEDURE..testproc..IS..BEGIN
...
......$IF..$$debug..$THEN
..........DBMS_OUTPUT.PUT_LINE('This..code..was..executed');
......................--..Line..A
...
END..testproc;
ALTER..SESSION..SET..PLSQL_CCFLAGS..=..'debug:false';
Mark..for..Review..
(1)..Points
$ENDIF
$$END;
$END..(*)
$ELSIF
$END;
Correct Correct
6... To..include..selections..of..code..for..compilation..based..on..u
ser-defined..values,..use..the..PLSQL_CCFLAGS..parameters...True..or..False?.. M
ark..for
..Review..
(1)..Points
True..(*)
False
Correct Correct
7... Obfuscation..does..not..allow..anyone..to..see..the..source..code
,..including..the..owner...True..or..False?.. Mark..for..Review..
(1)..Points
True..(*)
False
Correct Correct
8... Which..is..NOT..a..benefit..of..obfuscation?.. Mark..for..Review..
(1)..Points
Source..code..is..not..loaded..in..the..data..dictionary.
Source..code..is..hidden..from..all..users.
Source..code..is..visible..to..the..owner...(*)
Protection..for..intellectual..property..is..provided.
Correct Correct
9... When..wrapping..subprograms,..the..entire..PL/SQL..code..must..b
e..included..as..an..IN..argument..with..data..type..CLOB..to..allow..for..any..
size..program...
True..or..False?.. Mark..for..Review..
(1)..Points
True
False..(*)
Correct Correct
10... What..does..the..following..statement..do?
DBMS_WARNING.ADD_WARNING_SETTING_CAT('PERFORMANCE','ENABLE','SESSION');
Mark..for..Review..
(1)..Points
Enables..the..PERFORMANCE..warning..category,..setting..other..category..setting

s..to..disabled.
Enables..the..PERFORMANCE..warning..category,..leaving..other..category..setting

s..unchanged.
Add..the..PERFORMANCE..warning..category..into..a..PL/SQL..variable.
Disables..all..warning..categories,..then..enables..the..PERFORMANCE..category.
Enables..the..PERFORMANCE..warning..category,..leaving..other..category..setting

s..unchanged,..for..the..current..session...(*)
Correct Correct
11... In..the..USER_ERRORS..data..dictionary..view,..if..an..error..is..prefixed
..with.."W
arning,"..the..command..completes..but..has..a..side..effect..the..user..needs..
to..know..abou
t...For..all..other..errors,..the..command..terminates..abnormally...True..or..F
alse?..
Mark..for..Review..
(1)..Points
True..(*)
False
Correct Correct
12... The..two..statements..below..are..equivalent...True..or..False?
DBMS_WARNING.SET_WARNING_SETTING_STRING
........('ENABLE:SEVERE','SESSION');
and
ALTER..SESSION ....SET..PLSQL_WARNINGS..=..'ENABLE:SEVERE';
Mark..for..Review..
(1)..Points
True
False..(*)
Correct Correct
Section..14
(Answer..all..questions..in..this..section)
13... In..this..scenario,..the..following..status..is..given..for..each
..procedure:
........Procedure..A..is..local..and..has..a..time..stamp..of..10..AM ........Pr
ocedure..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,..wi
ll..execute..
successfully..at..11..AM...True..or..False?
Mark..for..Review..
(1)..Points
True..(*)
False
Correct Correct
14... If..two..related..objects..are..in..different..databases,..the..d
ependency..between..them..is..automatically..recorded..on..the..dependent..objec
t's..data..
dictionary...True..or..False?.. Mark..for..Review..
(1)..Points
True
False..(*)
Correct Correct
15... Procedure..B..has..its..local..variable..emp_number..changed..to
..emp_name...The..data..type..of..emp_id..is..changed..from..number..to..integer
...It..is..comp
iled..successfully...In..Signature..Mode,..Procedure..A,..which..is..dependent..
on..remote..
Procedure..B,..will..compile..and..execute..successfully...True..or..False?.. Ma
rk..for
..Review..
(1)..Points
True..(*)
False
Correct Correct
16... A..change..in..a..remote..referenced..subprogram..is..automatica
lly..recorded..as..invalid..if..its..base..object..changes..and..that..new..stat
us..is..relaye
d..to..the..dependent..object's..status..and..automatically..marked..as..invalid
...True..or..
False?.. Mark..for..Review..
(1)..Points
True
False..(*)
Correct Correct
17... Procedure..B..has..a..new..IN..OUT..parameter..added..to..it...It..c
ompiles..successfully...In..Signature..mode,..Procedure..A,..which..is..dependen
t..on..remo
te..Procedure..B,..will..fail...True..or..False?.. Mark..for..Review..
(1)..Points
True..(*)
False
Incorrect Incorrect...Refer..to..Section..14..Lesson..2.
18... Examine..the..following..code:
CREATE..VIEW..ed_view..AS
........SELECT..*..FROM..employees..NATURAL..JOIN..departments;
CREATE..PROCEDURE..ed_proc..IS
......CURSOR..ed_curs..IS..SELECT..*..FROM..ed_view;
Which..of..the..following..statements..about..dependencies..are..true?..(Choose.
.two.)
Mark..for..Review..
(1)..Points
(Choose..all..correct..answers)
ED_PROC..is..indirectly..dependent..on..DEPARTMENTS..(*)
EMPLOYEES..is..referenced..by..ED_VIEW..(*)
ED_CURS..is..directly..dependent..on..ED_VIEW
ED_PROC..is..referenced..by..ED_VIEW
ED_PROC..is..directly..dependent..on..EMPLOYEES
Correct Correct
19... User..BOB..wants..to..know..which..objects..reference..his..DEPAR
TMENTS..table...Which..of..the..following..must..he..execute..to..populate..the.
.DEPTREE_TEM
PTAB..table?.. Mark..for..Review..
(1)..Points
BEGIN
........utldtree('DEPARTMENTS');
END;
BEGIN
........deptree_fill('TABLE','BOB','DEPARTMENTS');
END;
(*)
BEGIN
........deptree_fill('TABLE','DEPARTMENTS');
END;
BEGIN
........ideptree('TABLE','BOB','DEPARTMENTS');
END;
Correct Correct
20... Which..of..the..following..is..NOT..created..when..the..utldtree.
sql..script..is..run?.. Mark..for..Review..
(1)..Points
The..DEPTREE..view
The..DEPTREE_FILL..procedure
The..USER_DEPENDENCIES..view..(*)
The..DEPTREE_TEMPTAB..table
Correct Correct
21... A..single..procedure..can..be..both..a..referenced..object..and..a..depend
ent..objec
t...True..or..False?.. Mark..for..Review..
(1)..Points
True..(*)
False
Correct Correct
22... Function..FETCH_EMP..references..the..EMPLOYEES..table...The..t
able..is..modified..by:
ALTER..TABLE..employees..ADD..(resume..CLOB);
When..will..the..ORACLE..server..try..to..recompile..FETCH_EMP..automatically?
Mark..for..Review..
(1)..Points
When..the..command..ALTER..FUNCTION..fetch_emp..COMPILE;..is..executed
The..next..time..a..user..session..invokes..FETCH_EMP..(*)
When..the..RESUME..column..is..dropped..from..the..EMPLOYEES..table
When..FETCH_EMP..is..dropped..and..recreated
Correct Correct
23... 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..an
d..DEPARTME
NTS?
Mark..for..Review..
(1)..Points
SELECT..name,..type
FROM..user_dependencies
WHERE..name..IN..('DEPTFUNC','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';
Correct Correct
24... Package..EMPPACK..contains..a..public..procedure..GET_EMP,..whi
ch..contains..a..reference..to..the..EMPLOYEES..table...Procedure..CALL_EMP..inv
okes..EMPPA
CK.GET_EMP...The..following..SQL..statement..is..executed:
ALTER..TABLE..employees..ADD..(gender..CHAR(1));
Which..one..of..the..following..statements..is..true?
Mark..for..Review..
(1)..Points
The..specification..and..body..of..EMPPACK..are..invalidated,..but..CALL_EMP..re
ma
ins..valid.
The..body..of..EMPPACK..is..invalidated,..but..the..specification..remains..vali
d.
..(*)
EMPPACK.GET_EMP..is..invalidated,..but..other..procedures..in..EMPPACK..remain..
v
alid.
Nothing..is..invalidated..because..the..PL/SQL..code..does..not..reference..the.
.GE
NDER..column.
Correct Correct
25... A..SELECT..from..the..DEPTREE..table..displays..table..LOCATIONS
..at..nested..level..0..and..procedure..LOCPROC..at..nested..level..2...This..sh
ows..that..LOCP
ROC..is..directly..dependent..on..LOCATIONS...True..or..False?.. Mark..for..Revi
ew..
(1)..Points
True
False..(*)
Correct Correct..

Das könnte Ihnen auch gefallen