Which statement is true in this scenario?

The database instance was recently started up. Examine the following parameter settings for the
database instance:
NAME TYPE VALUE
———————————— ———– —————————-………
result_cache_max_result integer 5
result_cache_max_size big integer 0
result_cache_mode string MANUAL
result_cache_remote_expiration integer 0
………
You reset the value for the result_cache_max_size parameter by issuing the following command:
SQL> ALTER SYSTEM SET result_cache_max_size = 1056k SCOPE = BOTH;
System altered.
Which statement is true in this scenario?

The database instance was recently started up. Examine the following parameter settings for the
database instance:
NAME TYPE VALUE
———————————— ———– —————————-………
result_cache_max_result integer 5
result_cache_max_size big integer 0
result_cache_mode string MANUAL
result_cache_remote_expiration integer 0
………
You reset the value for the result_cache_max_size parameter by issuing the following command:
SQL> ALTER SYSTEM SET result_cache_max_size = 1056k SCOPE = BOTH;
System altered.
Which statement is true in this scenario?

A.
1056 KB is allocated for the result cache and the result cache is enabled.

B.
1056 KB is allocated for the result cache, but the result cache is disabled.

C.
The results for only the queries that have the RESULT_CACHE hint are cached.

D.
The results for all the queries except those having the NO_RESULT_CACHE hint are cached.



Leave a Reply 6

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


morriarti

morriarti

https://docs.oracle.com/cd/B28359_01/server.111/b28310/memory004.htm#ADMIN11202
Look for Specifying the Result Cache Maximum Size:
“Note that after starting the database with the result cache disabled, if you use an ALTER SYSTEM statement to set RESULT_CACHE_MAX_SIZE to a nonzero value but do not restart the database, querying the value of the RESULT_CACHE_MAX_SIZE parameter returns a nonzero value even though the result cache is still disabled.”

morriarti

morriarti

Answer is B

Piero

Piero

my opinion answer is C,
but morriarti, from whom i have all to learn….. you don’t write nothing about scope…
it’s crucial
http://www.dba-oracle.com/t_oracle_scope_memory.htm

scope = memory
scope = spfile
scope = both
For scope = memory, Oracle will make the change specified by the alter system command for the life of the instance. The next time the database is bounced, for any reason, the change will be reverted to the default value.

For scope=spfile the change made in the alter system command will take place starting from the next startup but will not affect the current instance.

If you want the alter system command to take place immediately you can use the scope = both value, which will make the change for the current instance and preserve it through any future bounces.

BUT
if the result_cache_mode is MANUAL…….
I THINK …… that all theese arguments are unuseful … result_cache is never enabled from result_cache_max_size > 0.
only statements with hint /*result_cache/ enables and are cached in MANUAL mode
isn’t it ?
please write something about…. thanks

PIERO

PIERO

B,C seems right togheter

gelete

gelete

B.

Specifying the Result Cache Maximum Size

If RESULT_CACHE_MAX_SIZE is 0 upon instance startup, the result cache is disabled.

Note that after starting the database with the result cache disabled, if you use an
ALTER SYSTEM statement to set RESULT_CACHE_MAX_SIZE to a nonzero value
but do not restart the database, querying the value of the RESULT_CACHE_MAX_SIZE
parameter returns a nonzero value even though the result cache is still disabled.

The value of RESULT_CACHE_MAX_SIZE is therefore not the most reliable way to determine if the result cache is enabled.

http://docs.oracle.com/cd/B28359_01/server.111/b28310/memory004.htm#ADMIN11218