Sunday, September 30, 2007

OCP Oracle 10g Admin II - Ch14 Securing the Oracle Listener, Diagnostic Sources, and Memory

Review Questions
Securing the Oracle Listener, Diagnostic Sources, and Memory

1. Your database instance has the following initialization parameter set:
MAX_DUMP_FILE_SIZE = 1000
What effect will this setting have on user session trace files?
A. No effect. MAX_DUMP_FILE_SIZE affects only background process trace files.
B. Trace files will be limited to 1000 bytes.
C. Trace files will be limited to 1000 kilobytes.
D. Trace files will be limited to 1000 megabytes.
E. Trace files will be limited to 1000 blocks.
---
Ans: E.
The default unit type for the MAX_DUMP_FILE_SIZE parameter is blocks.

2. The following initialization parameters reside in your initialization file:
SGA_TARGET=8G
STREAMS_POOL_SIZE=500M
JAVA_POOL_SIZE=1G
SHARED_POOL_SIZE=3G
Which of the following statements will be true when your instance is started?
(Choose all that apply.)
A. The automatically sized components will have 6.5GB allocated among them.
B. The total SGA size will be 9GB.
C. The total SGA size will be 8GB.
D. The JAVA_POOL_SIZE will never shrink below 1GB.
E. The STREAMS_POOL_SIZE will always stay at 500MB.
----
Ans: C, D, E.
The SGA_TARGET parameter specifies total memory available for sizing the
SGA. This includes both automatically sized and manually sized components. The
Java pool is an automatically sized component, so its size is unknown, but it will
never shrink below the size specified in the JAVA_POOL_SIZE parameter. The streams
pool is a manually sized component, so it receives a static allocation of 500MB.

3. ASMM cannot be started on your instance. What might be the reason?
A. The shared pool is sized larger than the database buffer cache size.
B. The DB_KEEP_CACHE_SIZE parameter is not expressed as a power of 2.
C. The STATISTICS_LEVEL parameter is set to BASIC.
D. An invalid sizing parameter is specified.
E. The ASMM option is not installed.
---
Ans: C.
ASMM is dependent on Oracle statistics and requires a STATISTICS_LEVEL of
either TYPICAL or ALL. If the STATISTICS_LEVEL parameter is set to BASIC, ASMM
will not function.


4. You wish to limit database access to a select group of hosts. The following
lines have been added to your sqlnet.ora file:
tcp.validnode_checking = yes
tcp.invited_nodes = (peabody, 159.162.210.24, 159.162.211.*, 159.163.*.*)
From which of the following hosts will database requests be allowed?
A. peabody
B. 159.162.210.22
C. 159.162.211.44
D. 159.163.212.6
E. None. Valid node checking is defined in the tnsnames.ora file.
---
Ans: A.
Only option A is correct. Wildcards are not allowed in the tcp.invited_nodes
parameter, so only exact matches will be allowed.

5. Your external procedure agent is governed by the following listener setting:
ENVS="EXTPROC_DLLS=/lib/javalib.so:/lib/tlib.so"
Which of the following statements is true regarding external procedure
requests handled by this listener?
A. They can access procedures only in the /lib/javalib.so and /lib/tlib.so shared library files.
B. They can access procedures in the /lib/javalib.so and /lib/tlib.so shared libraries, as well as in any external libraries
referenced by these procedures.
C. They can access procedures in the /lib/javalib.so or /lib/tlib.so shared libraries, as well as in any libraries in the $ORACLE_HOME/lib directory.
D. They can access procedures in the /lib/javalib.so or /lib/tlib.so shared libraries, as well as in any libraries in the $ORACLE_HOME/lib directory. They can also access any external libraries referenced by
these procedures.
---
Ans: C.
The EXTPROC_DLLS environment variable limits the available shared libraries that
the agent can access. Since the ONLY option is not included in the example, the
specified libraries are available in addition to the default libraries (those in the
$ORACLE_HOME/lib directory).

6. You are working with Oracle Support to resolve a database issue. The support
technician asks you to forward any diagnostic files that might help them
resolve the issue. Which two of the following choices represent the best files to
send?
A. Alert log
B. Trace files from the USER_DUMP_DEST directory
C. Trace files from the BACKGROUND_DUMP_DEST directory
D. Files from both the USER_DUMP_DEST directory and the BACKGROUND_DUMP_DEST directory
E. External procedure files
---
Ans: A, C.
The alert log can be used to find error messages and other significant events,
along with a timestamp. Trace files from background sessions may also be helpful to
determine the cause of the problem. User trace files can be helpful to resolve errant
SQL statements, but those are not classified as database problems. External
procedure files do not exist.

7. You notice that a lot of disk space is being used up on one of your mount
points. Upon investigating, you find that SQL tracing is turned on for the
instance. You issue an ALTER SYSTEM statement to turn it off. In an SPFILE
environment, how can you determine if it was turned on at startup or if it was
turned on using an ALTER SYSTEM statement? Select the best answer.
A. User process trace file
B. Alert log
C. System log
D. Background process trace file
E. init.ora file
---
Ans: B.
The alert log details all startup events, including listing all of the non-default
initialization parameters that were set.


8. Your instance does not have a value set for the PGA_AGGREGATE_TARGET
initialization parameter. The server has 8GB of memory and the SGA is using
4GB. Which of the following statements is true regarding APMM for this
instance?
A. It will not be enabled.
B. It will use the default size of 10MB.
C. It will always use the *_AREA_SIZE parameters.
D. It will use the default size of 800MB.
E. It will dynamically allocate unused SGA memory.
-----
Ans: D.
If the PGA_AGGREGATE_TARGET parameter is not explicitly set, it will default to the
greater of 10MB or 20 percent of the SGA size (800MB). Therefore, it will default to
800MB.

9. Your junior DBA accidentally deleted the alert log file. How do you ensure
that Oracle will continue to function? Choose the best answer.
A. Restore the most recent backup.
B. Shut down the instance. A new file will be created on startup.
C. Create a new alert log file using EM Database Control.
D. Create a new alert log file using the ALTER SYSTEM statement.
E. Do nothing.
---
Ans: E.
A new alert log will be created automatically the next time Oracle needs to write
an alert log entry, so no action is required. You may indeed wish to restore the last
backup of the alert log if you want it for historical purposes, but that has no effect on
the Oracle instance itself.

10. You execute a Java stored procedure consisting of a single SQL statement
using a large hash-join operation and a large sort operation. Which memory
structure will have the most impact on your performance?
A. Shared pool
B. Java pool
C. SQL work area
D. Private SQL area
E. Shared SQL area
---
Ans: C.
Though Java stored procedures utilize Java pool memory, the usage is minimal. A
large sort operation, on the other hand, is greatly impacted by the size of the SQL
work area available to it.

11. The following initialization parameters are set on your database instance:
DB_NAME=LNX1
SQL_TRACE=FALSE
BACKGROUND_DUMP_DEST=/data1/admin/lnx1/bdump
USER_DUMP_DEST=/data1/admin/lnx1/udump
TRACEFILE_IDENTIFIER='prod'
An archiver (ARCH) process encounters an error situation. Its process ID is
32123. Which of the following is true?
A. The trace file /data1/admin/lnx1/bdump/lnx1_arch_32123.trc will be created.
B. The trace file /data1/admin/lnx1/bdump/arch_lnx1_32123_prod.trc will be created.
C. The trace file /data1/admin/lnx1/udump/arch_lnx1_32123.trc will be created.
D. The trace file /data1/admin/lnx1/bdump/lnx1_arch_32123_prod.trc will be created.
E. No trace file will be created.
----
Ans: B. Because the archiver is a background process, it will follow the naming
conventions and storage locations used by all background processes. The
TRACEFILE_IDENTIFIER parameter has no effect on background processes, so it is
ignored.


12. Which of the following could be found in the alert log? (Choose all that apply.)
A. Evidence of a brute force attack against the listener
B. External procedure executions
C. Tablespace creation events
D. Evidence of recovery operations
E. Initialization parameter values
---
Ans: C, D, E.
All of the information specified in C, D, and E is logged to the alert log.
Listener attacks would be logged in the listener log, not the alert log. External
procedure executions are not logged.


13. You need to secure your listener. Which of the following is not a
recommended security measure? (Choose the best answer.)
A. Enable Listener logging.
B. Remove unnecessary external procedure services.
C. Configure listener on a non-standard port.
D. Apply patches.
E. Block SQL*NET traffic on firewalls.
---
Ans: C.
Configuring the listener on a non-standard port may offer a slight security
increase, but port-scanning programs could still easily locate the listener. Therefore,
it is not a recommended security measure.


14. You want to set a password on the listener. Why might you want to use
lsnrctl rather than manually editing the listener.ora file? (Select the best
two answers.)
A. It is easier.
B. It will encrypt the password in the listener.ora file.
C. You don't have access to the operating system.
D. lsnrctl will log the event to the alert log.
E. The listener.ora file is stored in binary format.
----
Ans: B, C.
Manually editing the listener.ora file will result in a password that is stored
in plaintext, whereas lsnrctl will store the password in an encrypted format. Also,
you cannot manually edit the listener.ora file if you don't have access to the
operating system (for example, if you need to perform the change remotely, but don't
have an operating system account). In this situation, lsnrctl could be used from a
remote location.

15. Which of the following are not automatically sized components of ASMM?
A. Streams pool
B. Keep buffer cache
C. SQL work area
D. Recycle buffer cache
E. All of the above
---
Ans: E.
None of these components are automatically sized by ASMM. They are all
manually sized SGA components, except for the SQL work area. The SQL work area
isn't a part of the SGA at all. It is managed by APMM.


16. Which of the following operations is not impacted by the size of the SQL work
area? (Select the best answer.)
A. Index lookups
B. Sort operations
C. Bitmap merges
D. Bitmap creation
E. Bulk load operations
----
Ans: A.
Index lookups are not memory intensive, whereas sort operations, bitmap merges,
bitmap creation, and bulk load operations tend to be very memory intensive.
Therefore, the SQL work area size has a major impact on their performance.


17. You want to change the password for your listener. The listener.ora file
contains the following entries:
PASSWORDS_LISTENER=64F4692D9E6443F
LOGGING_LISTENER=ON
ADMIN_RESTRICTIONS=ON
Which of the following methods can you use to change the password?
A. lsnrctl
B. EM Database Control
C. Manually editing the listener.ora file
D. netmgr
E. netca
---
Ans: C. When the ADMIN_RESTRICTIONS option is enabled, all changes to the listener are
disabled, except through manually editing the listener.ora file. This protects from
changes being made remotely by unauthorized individuals.


18. Dirty blocks in the database buffer cache are tracked by which component?
A. Dirty block list
B. Block list
C. LRU list
D. Write list
E. Dirty list
---
Ans: D.
Dirty blocks in the database buffer are tracked in the write list. The write list is
accessed by the DBWR process to write dirty blocks back to disk.


19. While performing routine management tasks on your database, you discover a
high concentration of ORA-01169 messages in the listener log. What might be
the cause?
A. Invalid setting in the sqlnet.ora file.
B. Mismatched parentheses in the listener.ora file.
C. Valid node checking has denied connection requests based on their host addresses.
D. A brute force password attack has been attempted.
E. The database is down.
----
Ans: D.
The ORA-01169 message indicates a failed password attempt. Repeated
occurrences of the message likely indicate that someone is trying to hack the
password through a brute force attack.


20. The following parameters are set in your instance:
SGA_TARGET=3G
HASH_AREA_SIZE=100M
SORT_AREA_SIZE=100M
WORKAREA_SIZE_POLICY=AUTO
PGA_AGGREGATE_TARGET=600M
A user session executes a SQL statement that performs a large sort operation.
What can be determined from these settings? (Select the best two answers.)
A. The operation will be allocated 100MB.
B. The operation will be allocated a minimum of 100MB.
C. The *_AREA_SIZE parameters will be ignored.
D. The *_AREA_SIZE parameters will not be ignored.
E. The amount of memory allocated is not known.
---
Ans: C, E.

When the WORKAREA_SIZE_POLICY parameter is set to AUTO (the default
setting), APMM will dynamically size the SQL work area. Therefore, the amount of
memory actually allocated is unknown. The *_AREA_SIZE parameters have no
meaning unless the WORKAREA_SIZE_ POLICY is set to MANUAL

No comments: