Q1. You notice a high number of waits for the db file scattered read and db file sequential read events in the recent Automatic Database Diagnostic Monitor (ADDM) report. After further investigation, you find that queries are performing too many full table scans and indexes are not being used even though the filter columns are indexed.
Identify three possible reasons for this.
A. Missing or stale histogram statistics
B. Undersized shared pool
C. High clustering factor for the indexes
D. High value for the DB_FILE_MULTIBLOCK_READ_COUNT parameter
E. Oversized buffer cache
Answer: A,C,D
Explanation: D: DB_FILE_MULTIBLOCK_READ_COUNT is one of the parameters you can use to minimize I/O during table scans. It specifies the maximum number of blocks read in one I/O operation during a sequential scan. The total number of I/Os needed to perform a full table scan depends on such factors as the size of the table, the multiblock read count, and whether parallel execution is being utilized for the operation.
Q2. Which statement is true about Enterprise Manager (EM) express in Oracle Database 12c?
A. By default, EM express is available for a database after database creation.
B. You can use EM express to manage multiple databases running on the same server.
C. You can perform basic administrative tasks for pluggable databases by using the EM express interface.
D. You cannot start up or shut down a database Instance by using EM express.
E. You can create and configure pluggable databases by using EM express.
Answer: A
Explanation: EM Express is built inside the database.
Note: Oracle Enterprise Manager Database Express (EM Express) is a web-based database management tool that is built inside the Oracle Database. It supports key performance management and basic database administration functions. From an architectural perspective, EM Express has no mid-tier or middleware components, ensuring that its overhead on the database server is negligible.
Q3. Which two statements are true?
A. A role cannot be assigned external authentication.
B. A role can be granted to other roles.
C. A role can contain both system and object privileges.
D. The predefined resource role includes the unlimited_tablespace privilege.
E. All roles are owned by the sys user.
F. The predefined connect role is always automatically granted to all new users at the time of their creation.
Answer: B,C
Reference: http://docs.oracle.com/cd/E11882_01/network.112/e36292/authorization.htm#DBSEG9987
8 (the functionality of roles)
Q4. In your multitenant container database (CDB) containing same pluggable databases (PDBs), you execute the following commands in the root container:
Which two statements are true?
A. The C # # ROLE1 role is created in the root database and all the PDBs.
B. The C # # ROLE1 role is created only in the root database because the container clause is not used.
C. Privileges are granted to the C##A_ADMIN user only in the root database.
D. Privileges are granted to the C##A_ADMIN user in the root database and all PDBs.
E. The statement for granting a role to a user fails because the CONTAINER clause is not used.
Answer: A,C
Explanation: * You can include the CONTAINER clause in several SQL statements, such as the CREATE USER, ALTER USER, CREATE ROLE, GRANT, REVOKE, and ALTER SYSTEM statements. * * CREATE ROLE with CONTAINER (optional) clause / CONTAINER = ALL Creates a common role. / CONTAINER = CURRENT Creates a local role in the current PDB.
Q5. You administer an online transaction processing (OLTP) system whose database is stored in Automatic Storage Management (ASM) and whose disk group use normal redundancy.
One of the ASM disks goes offline, and is then dropped because it was not brought online before DISK_REPAIR_TIME elapsed.
When the disk is replaced and added back to the disk group, the ensuing rebalance operation is too slow.
Which two recommendations should you make to speed up the rebalance operation if this type of failure happens again?
A. Increase the value of the ASM_POWER_LIMIT parameter.
B. Set the DISK_REPAIR_TIME disk attribute to a lower value.
C. Specify the statement that adds the disk back to the disk group.
D. Increase the number of ASMB processes.
E. Increase the number of DBWR_IO_SLAVES in the ASM instance.
Answer: A,D
Explanation: A: ASM_POWER_LIMIT specifies the maximum power on an Automatic Storage Management instance for disk rebalancing. The higher the limit, the faster rebalancing will complete. Lower values will take longer, but consume fewer processing and I/O resources.
D:
* Normally a separate process is fired up to do that rebalance. This will take a certain amount of time. If you want it to happen faster, fire up more processes. You tell ASM it can add more processes by increasing the rebalance power.
* ASMB
ASM Background Process Communicates with the ASM instance, managing storage and providing statistics
Incorrect: Not B: A higher, not a lower, value of DISK_REPAIR_TIME would be helpful here. Not E: If you implement database writer I/O slaves by setting the DBWR_IO_SLAVES parameter, you configure a single (master) DBWR process that has slave processes that are subservient to it. In addition, I/O slaves can be used to "simulate" asynchronous I/O on platforms that do not support asynchronous I/O or implement it inefficiently. Database I/O slaves provide non-blocking, asynchronous requests to simulate asynchronous I/O.
Q6. Your are the DBA supporting an Oracle 11g Release 2 database and wish to move a table containing several DATE, CHAR, VARCHAR2, and NUMBER data types, and the table’s indexes, to another tablespace.
The table does not have a primary key and is used by an OLTP application.
Which technique will move the table and indexes while maintaining the highest level of availability to the application?
A. Oracle Data Pump.
B. An ALTER TABLE MOVE to move the table and ALTER INDEX REBUILD to move the indexes.
C. An ALTER TABLE MOVE to move the table and ALTER INDEX REBUILD ONLINE to move the indexes.
D. Online Table Redefinition.
E. Edition-Based Table Redefinition.
Answer: D
Explanation: * Oracle Database provides a mechanism to make table structure modifications without significantly affecting the availability of the table. The mechanism is called online table redefinition. Redefining tables online provides a substantial increase in availability compared to traditional methods of redefining tables.
* To redefine a table online:
Choose the redefinition method: by key or by rowid
* By key—Select a primary key or pseudo-primary key to use for the redefinition. Pseudo-primary keys are unique keys with all component columns having NOT NULL constraints. For this method, the versions of the tables before and after redefinition should have the same primary key columns. This is the preferred and default method of redefinition.
* By rowid—Use this method if no key is available. In this method, a hidden column named M_ROW$$ is added to the post-redefined version of the table. It is recommended that this column be dropped or marked as unused after the redefinition is complete. If COMPATIBLE is set to 10.2.0 or higher, the final phase of redefinition automatically sets this column unused. You can then use the ALTER TABLE ... DROP UNUSED COLUMNS statement to drop it.
You cannot use this method on index-organized tables.
Note:
* When you rebuild an index, you use an existing index as the data source. Creating an index in this manner enables you to change storage characteristics or move to a new tablespace. Rebuilding an index based on an existing data source removes intra-block fragmentation. Compared to dropping the index and using the CREATE INDEX statement, re-creating an existing index offers better performance.
Incorrect:
Not E: Edition-based redefinition enables you to upgrade the database component of an application while it is in use, thereby minimizing or eliminating down time.
Q7. You want to flash back a test database by five hours.
You issue this command:
SQL > FLASHBACK DATABASE TO TIMESTAMP (SYSDATE - 5/24);
Which two statements are true about this flashback scenario?
A. The database must have multiplexed redo logs for the flashback to succeed.
B. The database must be MOUNTED for the flashback to succeed.
C. The database must use block change tracking for the flashback to succeed.
D. The database must be opened in restricted mode for the flashback to succeed.
E. The database must be opened with the RESETLOGS option after the flashback is complete.
F. The database must be opened in read-only mode to check if the database has been flashed back to the correct SCN.
Answer: B,E
Q8. Which three statements are true about SQL plan directives?
A. They are tied to a specific statement or SQL ID.
B. They instruct the maintenance job to collect missing statistics or perform dynamic sampling to generate a more optimal plan.
C. They are used to gather only missing statistics.
D. They are created for a query expression where statistics are missing or the cardinality estimates by the optimizer are incorrect.
E. They instruct the optimizer to create only column group statistics.
F. Improve plan accuracy by persisting both compilation and execution statistics in the SYSAUX tablespace.
Answer: B,D,E
Explanation: During SQL execution, if a cardinality misestimate occurs, then the database creates SQL plan directives. During SQL compilation, the optimizer examines the query corresponding to the directive to determine whether missing extensions or histograms exist (D). The optimizer records any missing extensions. Subsequent DBMS_STATS calls collect statistics for the extensions.
The optimizer uses dynamic sampling whenever it does not have sufficient statistics corresponding to the directive. (B, not C)
E: Currently, the optimizer monitors only column groups. The optimizer does not create an extension on expressions.
Incorrect:
Not A: SQL plan directives are not tied to a specific SQL statement or SQL ID.
Note:
* A SQL plan directive is additional information and instructions that the optimizer can use to generate a more optimal plan. For example, a SQL plan directive can instruct the optimizer to record a missing extension.
Q9. You support Oracle Database 12c Oracle Database 11g, and Oracle Database log on the same server.
All databases of all versions use Automatic Storage Management (ASM).
Which three statements are true about the ASM disk group compatibility attributes that are set for a disk group?
A. The ASM compatibility attribute controls the format of the disk group metadata.
B. RDBMS compatibility together with the database version determines whether a database Instance can mount the ASM disk group.
C. The RDBMS compatibility setting allows only databases set to the same version as the compatibility value, to mount the ASM disk group.
D. The ASM compatibility attribute determines some of the ASM features that may be used by the Oracle disk group.
E. The ADVM compatibility attribute determines the ACFS features that may be used by the Oracle 10 g database.
Answer: A,B,D
Explanation: AD: The value for the disk group COMPATIBLE.ASM attribute determines the minimum software version for an Oracle ASM instance that can use the disk group. This setting also affects the format of the data structures for the Oracle ASM metadata on the disk.
B: The value for the disk group COMPATIBLE.RDBMS attribute determines the minimum COMPATIBLE database initialization parameter setting for any database instance that is allowed to use the disk group. Before advancing the COMPATIBLE.RDBMS attribute, ensure that the values for the COMPATIBLE initialization parameter for all of the databases that access the disk group are set to at least the value of the new setting for COMPATIBLE.RDBMS.
For example, if the COMPATIBLE initialization parameters of the databases are set to either 11.1 or 11.2, then COMPATIBLE.RDBMS can be set to any value between 10.1 and
11.1 inclusively.
Not E: /The value for the disk group COMPATIBLE.ADVM attribute determines whether the disk group can contain Oracle ASM volumes. The value must be set to 11.2 or higher. Before setting this attribute, the COMPATIBLE.ASM value must be 11.2 or higher. Also, the Oracle ADVM volume drivers must be loaded in the supported environment.
/ You can create an Oracle ASM Dynamic Volume Manager (Oracle ADVM) volume in a disk group. The volume device associated with the dynamic volume can then be used to host an Oracle ACFS file system.
The compatibility parameters COMPATIBLE.ASM and COMPATIBLE.ADVM must be set to
11.2 or higher for the disk group.
Note:
* The disk group attributes that determine compatibility are COMPATIBLE.ASM, COMPATIBLE.RDBMS. and COMPATIBLE.ADVM. The COMPATIBLE.ASM and COMPATIBLE.RDBMS attribute settings determine the minimum Oracle Database software version numbers that a system can use for Oracle ASM and the database instance types respectively. For example, if the Oracle ASM compatibility setting is 11.2, and RDBMS compatibility is set to 11.1, then the Oracle ASM software version must be at least 11.2, and the Oracle Database client software version must be at least 11.1. The COMPATIBLE.ADVM attribute determines whether the Oracle ASM Dynamic Volume Manager feature can create an volume in a disk group.
Q10. Examine the following command;
ALTER SYSTEM SET enable_ddl_logging = TRUE;
Which statement is true?
A. Only the data definition language (DDL) commands that resulted in errors are logged in the alert log file.
B. All DDL commands are logged in the alert log file.
C. All DDL commands are logged in a different log file that contains DDL statements and their execution dates.
D. Only DDL commands that resulted in the creation of new segments are logged.
E. All DDL commands are logged in XML format in the alert directory under the Automatic Diagnostic Repository (ADR) home.
Answer: B
Explanation: Once DDL logging is turned on, every DDL command will be logged in the alert log file and also the log.xml file.
Note:
* By default Oracle database does not log any DDL operations performed by any user. The default settings for auditing only logs DML operations.
* Oracle 12c DDL Logging – ENABLE_DDL_LOGGING
The first method is by using the enabling a DDL logging feature built into the database. By default it is turned off and you can turn it on by setting the value of ENABLE_DDL_LOGGING initialization parameter to true.
* We can turn it on using the following command. The parameter is dynamic and you can
turn it on/off on the go.
SQL> alter system set ENABLE_DDL_LOGGING=true;
System altered. Elapsed: 00:00:00.05 SQL>
Once it is turned on, every DDL command will be logged in the alert log file and also the log.xml file.