What would be the effect on the two procedures if the value of debug is set to false?

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.)

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…



Leave a Reply 36

Your email address will not be published. Required fields are marked *


Divya Tanwani

Divya Tanwani

C and D is the answer
Visit this link:
http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/fundamentals.htm#BABIHIHF

admin

admin

It’s useful. Thanks.

gunjan

gunjan

thx the link really helped out..

Kuki

Kuki

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.

Shahriyar

Shahriyar

Divya Tanwani, thank you very much for your help! for link!

Sadeq

Sadeq

Thannks a lot, helpful link….

qaisarimtiaz

qaisarimtiaz

thanks for link Divya Tanwani…

Yogesh

Yogesh

Great!!! This is really useful.

Marian

Marian

the question expecting the answer based on the misleading explanation in the reference. the correct answer is A, D, though. only proc1 is invalidated.

Paul

Paul

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’.

Heena

Heena

correct answer is C and D..

martin

martin

in oracle 12c my_proc2 didn’t change or recompile

however exam is for version 11g so CD is correct I think

Ahmed

Ahmed

C and D are correct
reference
conditional compilation in oracle 11 g

Leo Yu

Leo Yu

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

plsql developer

plsql developer

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.

Google

Google

Please go to the web-sites we comply with, such as this one particular, as it represents our picks in the web.

app maker free

app maker free

Sites of interest we have a link to

app maker free

app maker free

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

kala jadu

kala jadu

usually posts some very fascinating stuff like this. If you are new to this site

make a app

make a app

usually posts some extremely interesting stuff like this. If youre new to this site

military soldier blog

military soldier blog

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

Youtube to mp3

Youtube to mp3

one of our guests just lately proposed the following website

Our Work-AtlantaPiano

Our Work-AtlantaPiano

one of our guests not too long ago suggested the following website

how to make your own app

how to make your own app

we came across a cool web-site that you might delight in. Take a look in case you want

Wood fired pizza oven Pizza Party

Wood fired pizza oven Pizza Party

very couple of internet sites that happen to be detailed below, from our point of view are undoubtedly properly worth checking out

Cash for car melbourne

Cash for car melbourne

check beneath, are some totally unrelated web-sites to ours, on the other hand, they are most trustworthy sources that we use

Fenster

Fenster

The details mentioned inside the post are some of the top readily available

Divorce And Children

Divorce And Children

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

online istikhara

online istikhara

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

Packshot

Packshot

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