View the Exhibit and examine the code and its outcome on execution:
What would be the effect on the two procedures if the value of debug is set to false? (Choose two.)
A.
MY_PROC2 is not recompiled.
B.
MY_PROC1 is recompiled but remains unchanged.
C.
MY_PROC2 is recompiled but remains unchanged.
D.
MY_PROC1 is recompiled without the debugging code.
Explanation:
I am not sure but What I know, debug and trace are constant variable , the can not be modified from outsite, and package was created “create package” so , for changing variable value , the package must be drop first…
C and D is the answer
Visit this link:
http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/fundamentals.htm#BABIHIHF
It’s useful. Thanks.
thx the link really helped out..
from that link…they use the completely same example:
Example 2-32 Using Static Constants
CREATE PACKAGE my_debug IS
debug CONSTANT BOOLEAN := TRUE;
trace CONSTANT BOOLEAN := TRUE;
END my_debug;
/
CREATE PROCEDURE my_proc1 IS
BEGIN
$IF my_debug.debug $THEN DBMS_OUTPUT.put_line(‘Debugging ON’);
$ELSE DBMS_OUTPUT.put_line(‘Debugging OFF’); $END
END my_proc1;
/
CREATE PROCEDURE my_proc2 IS
BEGIN
$IF my_debug.trace $THEN DBMS_OUTPUT.put_line(‘Tracing ON’);
$ELSE DBMS_OUTPUT.put_line(‘Tracing OFF’); $END
END my_proc2;
/
Changing the value of one of the constants forces all the dependent units of the package to recompile with the new value. For example, changing the value of debug to FALSE would cause my_proc1 to be recompiled without the debugging code. my_proc2 would also be recompiled, but my_proc2 would be unchanged because the value of trace did not change.
Divya Tanwani, thank you very much for your help! for link!
Thannks a lot, helpful link….
thanks for link Divya Tanwani…
Great!!! This is really useful.
the question expecting the answer based on the misleading explanation in the reference. the correct answer is A, D, though. only proc1 is invalidated.
Here is the code in Oracle’s own documentation.
http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/fundamentals.htm#CIHEBFHF
The answer is A and D.
It should be noted that “Debugging OFF” is STILL produced by my_proc1 (I ran the code on my own database). I think option D really means ‘further debugging statements in the procedure would be disabled’.
correct answer is C and D..
C,D
in oracle 12c my_proc2 didn’t change or recompile
however exam is for version 11g so CD is correct I think
C and D are correct
reference
conditional compilation in oracle 11 g
guys, furrther reminding on “boolean static expression” with the “conditional compilation”:
In the selection directive of conditional compilation as below
$IF boolean_static_expression $THEN
….
$END
http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/fundamentals.htm#CHDIGDHA
BOOLEAN Static Expressions
BOOLEAN static expressions are:
BOOLEAN literals (TRUE, FALSE, or NULL)
BOOLEAN static constants like myPackage.myConstants
Where x and y are PLS_INTEGER static expressions, like X>Y
Where x and y are BOOLEAN expressions like NOT Y
Where x is a static expression like X IS NULL
Below conditional compilation is incorrect:
$IF ‘myString1’ = ‘myString2’ $THEN
….
$END
Pretty! This has been an incredibly wonderful post. Many thanks for providing these details.|
http://www.babyboomers.co.id/cara-membuat-website-bisa-belajar-di-babyboomers-co-id/
C and D are answers.
A can not be because it is conditional compilation so they will recompile.
B proc1 will be changed off course.
C it is against A so it will be one of the answers.
D it is against B so it will be one of the answers.
Please go to the web-sites we comply with, such as this one particular, as it represents our picks in the web.
Sites of interest we have a link to
Sites of interest we’ve a link to
please pay a visit to the websites we comply with, including this one, because it represents our picks in the web
usually posts some very fascinating stuff like this. If you are new to this site
usually posts some extremely interesting stuff like this. If youre new to this site
Every as soon as in a whilst we opt for blogs that we read. Listed below would be the newest web pages that we select
one of our guests just lately proposed the following website
one of our guests not too long ago suggested the following website
we came across a cool web-site that you might delight in. Take a look in case you want
very couple of internet sites that happen to be detailed below, from our point of view are undoubtedly properly worth checking out
check beneath, are some totally unrelated web-sites to ours, on the other hand, they are most trustworthy sources that we use
The details mentioned inside the post are some of the top readily available
that may be the end of this post. Here youll uncover some internet sites that we believe you will enjoy, just click the links over
we prefer to honor many other web sites around the net, even if they arent linked to us, by linking to them. Under are some webpages worth checking out
one of our guests just lately recommended the following website
please take a look at the internet sites we comply with, which includes this 1, because it represents our picks through the web
cartierbraceletlove Do yyou require to register with SSM to do e-commerce in Malaysia?
cartier falso love http://www.miglioreanello.com/