Q1. Which two statements are true about the RMAN validate database command?
A. It checks the database for intrablock corruptions.
B. It can detect corrupt pfiles.
C. It can detect corrupt spfiles.
D. It checks the database for interblock corruptions.
E. It can detect corrupt block change tracking files.
Answer: A,C
Explanation:
Block corruptions can be divided Into Interblock corruption and intrablock corruption. In intrablock corruption. th. corruption occurs within the block itself and can be either physical or logical corruption. In interblock corruption, the corruption occurs between blocks and can only be logical corruption. (key word) * The VALIDATE command checks for intrablock corruptions only. Only DBVERIFY and the ANALYZE statement detect Interblock corruption. VALIDATE Command Output ..> List of Control File and SPFILE.
File TYPE >.. SPFILE or Control File.
Status >.. OK if no corruption, or FAILED If block corruption is found.
Blocks Failing ... The number of blocks that fail the corruption check. These
blocks are newly corrupt.
Blocks Examined ... Total number of blocks in the file.
Oracle' Database Backup and Recovery User's Guide
12c Release 1 (12.1) - 16 Validating Database Files and Backups
Q2. Which statement is true about Oracle Net Listener?
A. It acts as the listening endpoint for the Oracle database instance for all local and non-local user connections.
B. A single listener can service only one database instance and multiple remote client connections.
C. Service registration with the listener is performed by the process monitor (PMON) process of each database instance.
D. The listener.ora configuration file must be configured with one or more listening protocol addresses to allow remote users to connect to a database instance.
E. The listener.ora configuration file must be located in the ORACLE_HOME/network/admin directly.
Answer: C
Explanation: Supported services, that is, the services to which the listener forwards client requests, can be configured in the listener.ora file or this information can be dynamically registered with the listener. This dynamic registration feature is called service registration.
The registration is performed by the PMON process—an instance background process—of each database instance that has the necessary configuration in the database initialization parameter file. Dynamic service registration does not require any configuration in the listener.ora file.
Incorrect:
Not B: Service registration reduces the need for the SID_LIST_listener_name parameter setting, which specifies information about the databases served by the listener, in the listener.ora file.
Note:
* Oracle Net Listener is a separate process that runs on the database server computer. It receives incoming client connection requests and manages the traffic of these requests to the database server.
* A remote listener is a listener residing on one computer that redirects connections to a database instance on another computer. Remote listeners are typically used in an Oracle Real Application Clusters (Oracle RAC) environment. You can configure registration to remote listeners, such as in the case of Oracle RAC, for dedicated server or shared server environments.
Q3. You upgraded your database from pre-12c to a multitenant container database (CDB) containing pluggable databases (PDBs).
Examine the query and its output:
Which two tasks must you perform to add users with SYSBACKUP, SYSDG, and SYSKM privilege to the password file?
A. Assign the appropriate operating system groups to SYSBACKUP, SYSDG, SYSKM.
B. Grant SYSBACKUP, SYSDG, and SYSKM privileges to the intended users.
C. Re-create the password file with SYSBACKUP, SYSDG, and SYSKM privilege and the FORCE argument set to No.
D. Re-create the password file with SYSBACKUP, SYSDG, and SYSKM privilege, and FORCE arguments set to Yes.
E. Re-create the password file in the Oracle Database 12c format.
Answer: B,D
Explanation:
* orapwd
/ You can create a database password file using the password file creation utility,
ORAPWD.
The syntax of the ORAPWD command is as follows:
orapwd FILE=filename [ENTRIES=numusers] [FORCE={y|n}] [ASM={y|n}]
[DBUNIQUENAME=dbname] [FORMAT={12|legacy}] [SYSBACKUP={y|n}] [SYSDG={y|n}]
[SYSKM={y|n}] [DELETE={y|n}] [INPUT_FILE=input-fname]
force - whether to overwrite existing file (optional),
* v$PWFILE_users / 12c: V$PWFILE_USERS lists all users in the password file, and indicates whether the user has been granted the SYSDBA, SYSOPER, SYSASM, SYSBACKUP, SYSDG, and SYSKM privileges.
/ 10c: sts users who have been granted SYSDBA and SYSOPER privileges as derived from the password file.
ColumnDatatypeDescription USERNAMEVARCHAR2(30)The name of the user that is contained in the password file SYSDBAVARCHAR2(5)If TRUE, the user can connect with SYSDBA privileges SYSOPERVARCHAR2(5)If TRUE, the user can connect with SYSOPER privileges
Incorrect:
not E: The format of the v$PWFILE_users file is already in 12c format.
Q4. You notice a performance change in your production Oracle database and you want to know which change has made this performance difference.
You generate the Compare Period Automatic Database Diagnostic Monitor (ADDM) report to further investigation.
Which three findings would you get from the report?
A. It detects any configuration change that caused a performance difference in both time periods.
B. It identifies any workload change that caused a performance difference in both time periods.
C. It detects the top wait events causing performance degradation.
D. It shows the resource usage for CPU, memory, and I/O in both time periods.
E. It shows the difference in the size of memory pools in both time periods.
F. It gives information about statistics collection in both time periods.
Answer: A,B,D
Explanation: Keyword: shows the difference.
* Full ADDM analysis across two AWR snapshot periods Detects causes, measure effects, then correlates them Causes: workload changes, configuration changes Effects: regressed SQL, reach resource limits (CPU, I/O, memory, interconnect) Makes actionable recommendations along with quantified impact
* Identify what changed / Configuration changes, workload changes
* Performance degradation of the database occurs when your database was performing optimally in the past, such as 6 months ago, but has gradually degraded to a point where it becomes noticeable to the users. The Automatic Workload Repository (AWR) Compare Periods report enables you to compare database performance between two periods of time.
While an AWR report shows AWR data between two snapshots (or two points in time), the AWR Compare Periods report shows the difference (ABE) between two periods (or two AWR reports with a total of four snapshots). Using the AWR Compare Periods report helps you to identify detailed performance attributes and configuration settings that differ between two time periods.
Reference: Resolving Performance Degradation Over Time
Q5. You executed a DROP USER CASCADE on an Oracle 11g release 1 database and immediately realized that you forgot to copy the OCA.EXAM_RESULTS table to the OCP schema.
The RECYCLE_BIN enabled before the DROP USER was executed and the OCP user has been granted the FLASHBACK ANY TABLE system privilege.
What is the quickest way to recover the contents of the OCA.EXAM_RESULTS table to the OCP schema?
A. Execute FLASHBACK TABLE OCA.EXAM_RESULTS TO BEFORE DROP RENAME TO OCP.EXAM_RESULTS; connected as SYSTEM.
B. Recover the table using traditional Tablespace Point In Time Recovery.
C. Recover the table using Automated Tablespace Point In Time Recovery.
D. Recovery the table using Database Point In Time Recovery.
E. Execute FLASHBACK TABLE OCA.EXAM_RESULTS TO BEFORE DROP RENAME TO EXAM_RESULTS; connected as the OCP user.
Answer: C
Explanation: RMAN tablespace point-in-time recovery (TSPITR).
Recovery Manager (RMAN) TSPITR enables quick recovery of one or more tablespaces in a database to an earlier time without affecting the rest of the tablespaces and objects in the database.
Fully Automated (the default)
In this mode, RMAN manages the entire TSPITR process including the auxiliary instance.
You specify the tablespaces of the recovery set, an auxiliary destination, the target time, and you allow RMAN to manage all other aspects of TSPITR.
The default mode is recommended unless you specifically need more control over the location of recovery set files after TSPITR, auxiliary set files during TSPITR, channel settings and parameters or some other aspect of your auxiliary instance.
Q6. On your Oracle 12c database, you invoked SQL *Loader to load data into the EMPLOYEES table in the HR schema by issuing the following command:
$> sqlldr hr/hr@pdb table=employees
Which two statements are true regarding the command?
A. It succeeds with default settings if the EMPLOYEES table belonging to HR is already defined in the database.
B. It fails because no SQL *Loader data file location is specified.
C. It fails if the HR user does not have the CREATE ANY DIRECTORY privilege.
D. It fails because no SQL *Loader control file location is specified.
Answer: A,C
Explanation:
Note:
* SQL*Loader is invoked when you specify the sqlldr command and, optionally, parameters that establish session characteristics.
Q7. The following parameter are set for your Oracle 12c database instance:
OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES=FALSE OPTIMIZER_USE_SQL_PLAN_BASELINES=TRUE
You want to manage the SQL plan evolution task manually. Examine the following steps:
1. Set the evolve task parameters.
2. Create the evolve task by using the DBMS_SPM.CREATE_EVOLVE_TASK function.
3. Implement the recommendations in the task by using the DBMS_SPM.IMPLEMENT_EVOLVE_TASK function.
4. Execute the evolve task by using the DBMS_SPM.EXECUTE_EVOLVE_TASK function.
5. Report the task outcome by using the DBMS_SPM.REPORT_EVOLVE_TASK function.
Identify the correct sequence of steps:
A. 2, 4, 5
B. 2, 1, 4, 3, 5
C. 1, 2, 3, 4, 5
D. 1, 2, 4, 5
Answer: B
Explanation: * Evolving SQL Plan Baselines
Description of Figure 23-4 follows *
2. Create the evolve task by using the DBMS_SPM.CREATE_EVOLVE_TASK function.
This function creates an advisor task to prepare the plan evolution of one or more plans for a specified SQL statement. The input parameters can be a SQL handle, plan name or a list of plan names, time limit, task name, and description.
1. Set the evolve task parameters.
SET_EVOLVE_TASK_PARAMETER
This function updates the value of an evolve task parameter. In this release, the only valid parameter is TIME_LIMIT.
4. Execute the evolve task by using the DBMS_SPM.EXECUTE_EVOLVE_TASK function.
This function executes an evolution task. The input parameters can be the task name, execution name, and execution description. If not specified, the advisor generates the name, which is returned by the function.
3: IMPLEMENT_EVOLVE_TASK
This function implements all recommendations for an evolve task. Essentially, this function is equivalent to using ACCEPT_SQL_PLAN_BASELINE for all recommended plans. Input parameters include task name, plan name, owner name, and execution name.
5. Report the task outcome by using the DBMS_SPM_EVOLVE_TASK function.
This function displays the results of an evolve task as a CLOB. Input parameters include the task name and section of the report to include.
Reference: Oracle Database SQL Tuning Guide 12c, Managing SQL Plan Baselines
Q8. An application accesses a small lookup table frequently. You notice that the required data blocks are getting aged out of the default buffer cache.
How would you guarantee that the blocks for the table never age out?
A. Configure the KEEP buffer pool and alter the table with the corresponding storage clause.
B. Increase the database buffer cache size.
C. Configure the RECYCLE buffer pool and alter the table with the corresponding storage clause.
D. Configure Automata Shared Memory Management.
E. Configure Automatic Memory Management-
Answer: A
Explanation: Schema objects are referenced with varying usage patterns; therefore, their cache behavior may be quite different. Multiple buffer pools enable you to address these differences. You can use a KEEP buffer pool to maintain objects in the buffer cache and a RECYCLE buffer pool to prevent objects from consuming unnecessary space in the cache. When an object is allocated to a cache, all blocks from that object are placed in that cache. Oracle maintains a DEFAULT buffer pool for objects that have not been assigned to one of the buffer pools.
Q9. You execute the following commands to audit database activities:
SQL > ALTER SYSTEM SET AUDIT_TRIAL=DB, EXTENDED SCOPE=SPFILE;
SQL > AUDIT SELECT TABLE, INSERT TABLE, DELETE TABLE BY JOHN By SESSION WHENEVER SUCCESSFUL;
Which statement is true about the audit record that generated when auditing after instance restarts?
A. One audit record is created for every successful execution of a SELECT, INSERT OR DELETE command on a table, and contains the SQL text for the SQL Statements.
B. One audit record is created for every successful execution of a SELECT, INSERT OR DELETE command, and contains the execution plan for the SQL statements.
C. One audit record is created for the whole session if john successfully executes a SELECT, INSERT, or DELETE command, and contains the execution plan for the SQL statements.
D. One audit record is created for the whole session if JOHN successfully executes a select command, and contains the SQL text and bind variables used.
E. One audit record is created for the whole session if john successfully executes a SELECT, INSERT, or DELETE command on a table, and contains the execution plan, SQL text, and bind variables used.
Answer: A
Explanation:
Note:
* BY SESSION
In earlier releases, BY SESSION caused the database to write a single record for all SQL statements or operations of the same type executed on the same schema objects in the same session. Beginning with this release (11g) of Oracle Database, both BY SESSION and BY ACCESS cause Oracle Database to write one audit record for each audited statement and operation.
* BY ACCESS
Specify BY ACCESS if you want Oracle Database to write one record for each audited statement and operation.
Note:
If you specify either a SQL statement shortcut or a system privilege that audits a data definition language (DDL) statement, then the database always audits by access. In all other cases, the database honors the BY SESSION or BY ACCESS specification.
* For each audited operation, Oracle Database produces an audit record containing this information: / The user performing the operation / The type of operation / The object involved in the operation / The date and time of the operation
Reference: Oracle Database SQL Language Reference 12c
Q10. You have altered a non-unique index to be invisible to determine if queries execute within an acceptable response time without using this index.
Which two are possible if table updates are performed which affect the invisible index columns?
A. The index remains invisible.
B. The index is not updated by the DML statements on the indexed table.
C. The index automatically becomes visible in order to have it updated by DML on the table.
D. The index becomes unusable but the table is updated by the DML.
E. The index is updated by the DML on the table.
Answer: A,E
Explanation: Unlike unusable indexes, an invisible index is maintained during DML statements.
Note:
* Oracle 11g allows indexes to be marked as invisible. Invisible indexes are maintained like any other index, but they are ignored by the optimizer unless the OPTIMIZER_USE_INVISIBLE_INDEXES parameter is set to TRUE at the instance or session level. Indexes can be created as invisible by using the INVISIBLE keyword, and their visibility can be toggled using the ALTER INDEX command.