Q1. Your multitenant container (CDB) contains two pluggable databases (PDB), HR_PDB and ACCOUNTS_PDB, both of which use the CDB tablespace. The temp file is called temp01.tmp.
A user issues a query on a table on one of the PDBs and receives the following error:
ERROR at line 1:
ORA-01565: error in identifying file ‘/u01/app/oracle/oradata/CDB1/temp01.tmp’
ORA-27037: unable to obtain file status
Identify two ways to rectify the error.
A. Add a new temp file to the temporary tablespace and drop the temp file that that produced the error.
B. Shut down the database instance, restore the temp01.tmp file from the backup, and then restart the database.
C. Take the temporary tablespace offline, recover the missing temp file by applying redo logs, and then bring the temporary tablespace online.
D. Shutdown the database instance, restore and recover the temp file from the backup, and then open the database with RESETLOGS.
E. Shut down the database instance and then restart the CDB and PDBs.
Answer: A,E
Explanation: * Because temp files cannot be backed up and because no redo is ever generated for them, RMAN never restores or recovers temp files. RMAN does track the names of temp files, but only so that it can automatically re-create them when needed.
* If you use RMAN in a Data Guard environment, then RMAN transparently converts primary control files to standby control files and vice versa. RMAN automatically updates file names for data files, online redo logs, standby redo logs, and temp files when you issue RESTORE and RECOVER.
Q2. Which three resources might be prioritized between competing pluggable databases when creating a multitenant container database plan (CDB plan) using Oracle Database
Resource Manager?
A. Maximum Undo per consumer group
B. Maximum Idle time
C. Parallel server limit
D. CPU
E. Exadata I/O
F. Local file system I/O
Answer: A,C,D
Q3. You find this query being used in your Oracle 12c database:
Which method a used by the optimizer to limit the rows being returned?
A. A filter is added to the table query dynamically using ROWNUM to limit the rows to 20 percent of the total rows
B. All the rows are returned to the client or middle tier but only the first 20 percent are returned to the screen or the application.
C. A view is created during execution and a filter on the view limits the rows to 20 percent of the total rows.
D. A TOP-N query is created to limit the rows to 20 percent of the total rows
Answer: C
Q4. Flashback is enabled for your multitenant container database (CDB), which contains two pluggable database (PDBs). A local user was accidently dropped from one of the PDBs.
You want to flash back the PDB to the time before the local user was dropped. You connect to the CDB and execute the following commands:
SQL > SHUTDOWN IMMEDIATE SQL > STARTUP MOUNT SQL > FLASHBACK DATABASE to TIME “TO_DATE (‘08/20/12’ , ‘MM/DD/YY’)”;
Examine following commands:
1. ALTER PLUGGABLE DATABASE ALL OPEN;
2. ALTER DATABASE OPEN;
3. ALTER DATABASE OPEN RESETLOGS;
Which command or commands should you execute next to allow updates to the flashback back schema?
A. Only 1
B. Only 2
C. Only 3
D. 3 and 1
E. 1 and 2
Answer: C
Explanation: Example (see step23):
Step 1:
Run the RMAN FLASHBACK DATABASE command.
You can specify the target time by using a form of the command shown in the following
examples:
FLASHBACK DATABASE TO SCN 46963;
FLASHBACK DATABASE
TO RESTORE POINT BEFORE_CHANGES;
FLASHBACK DATABASE TO TIME
"TO_DATE('09/20/05','MM/DD/YY')";
When the FLASHBACK DATABASE command completes, the database is left mounted and recovered to the specified target time.
Step 2:
Make the database available for updates by opening the database with the RESETLOGS option. If the database is currently open read-only, then execute the following commands in SQL*Plus:
SHUTDOWN IMMEDIATE
STARTUP MOUNT
ALTER DATABASE OPEN RESETLOGS;
Q5. As a user of the ORCL database, you establish a database link to the remote HQ database such that all users in the ORCL database may access tables only from the SCOTT schema in the HQ database. SCOTT’s password is TIGER. The service mane “HQ” is used to connect to the remote HQ database.
Which command would you execute to create the database link?
A. CREATE DATABASE LINK HQ USING 'HQ'
B. CREATE DATABASE LINK HQ CONNECT TO CXJRRENT_USER USING HQ' S
C. CREATE PUBLIC DATABASE LINK HQ CONNECT TO scott IDENTIFIED BY tiger USING 'HQ'
D. CREATE DATABASE LINK HQ CONNECT TO scott IDENTIFIED BY tiger USING 'HQ'
Answer: B
Q6. In a recent Automatic Workload Repository (AWR) report for your database, you notice a high number of buffer busy waits. The database consists of locally managed tablespaces with free list managed segments.
On further investigation, you find that buffer busy waits is caused by contention on data blocks.
Which option would you consider first to decrease the wait event immediately?
A. Decreasing PCTUSED
B. Decreasing PCTFREE
C. Increasing the number of DBWN process
D. Using Automatic Segment Space Management (ASSM)
E. Increasing db_buffer_cache based on the V$DB_CACHE_ADVICE recommendation
Answer: D
Explanation: * Automatic segment space management (ASSM) is a simpler and more efficient way of managing space within a segment. It completely eliminates any need to specify and tune the pctused,freelists, and freelist groups storage parameters for schema objects created in the tablespace. If any of these attributes are specified, they are ignored.
* Oracle introduced Automatic Segment Storage Management (ASSM) as a replacement for traditional freelists management which used one-way linked-lists to manage free blocks with tables and indexes. ASSM is commonly called "bitmap freelists" because that is how Oracle implement the internal data structures for free block management.
Note:
* Buffer busy waits are most commonly associated with segment header contention onside the data buffer pool (db_cache_size, etc.).
* The most common remedies for high buffer busy waits include database writer (DBWR) contention tuning, adding freelists (or ASSM), and adding missing indexes.
Q7. Examine the following parameters for a database instance:
MEMORY_MAX_TARGET=0 MEMORY_TARGET=0 SGA_TARGET=0 PGA_AGGREGATE_TARGET=500m
Which three initialization parameters are not controlled by Automatic Shared Memory Management (ASMM)?
A. LOG_BUFFER
B. SORT_AREA_SIZE
C. JAVA_POOL_SIZE
D. STREAMS_POOL_SIZE
E. DB_16K_CACHE_SZIE
F. DB_KEEP_CACHE_SIZE
Answer: A,E,F
Explanation: Manually Sized SGA Components that Use SGA_TARGET Space SGA Component, Initialization Parameter / The log buffer LOG_BUFFER / The keep and recycle buffer caches DB_KEEP_CACHE_SIZE DB_RECYCLE_CACHE_SIZE / Nonstandard block size buffer caches DB_nK_CACHE_SIZE
Note:
* In addition to setting SGA_TARGET to a nonzero value, you must set to zero all initialization parameters listed in the table below to enable full automatic tuning of the automatically sized SGA components.
* Table, Automatically Sized SGA Components and Corresponding Parameters
Q8. Which two statements are true concerning the Resource Manager plans for individual pluggable databases (PDB plans) in a multitenant container database (CDB)?
A. If no PDB plan is enabled for a pluggable database, then all sessions for that PDB are treated to an equal degree of the resource share of that PDB.
B. In a PDB plan, subplans may be used with up to eight consumer groups.
C. If a PDB plan is enabled for a pluggable database, then resources are allocated to consumer groups across all PDBs in the CDB.
D. If no PDB plan is enabled for a pluggable database, then the PDB share in the CDB plan is dynamically calculated.
E. If a PDB plan is enabled for a pluggable database, then resources are allocated to consumer groups based on the shares provided to the PDB in the CDB plan and the shares provided to the consumer groups in the PDB plan.
Answer: A,E
Explanation: A: Setting a PDB resource plan is optional. If not specified, all sessions
within the PDB are treated equally.
* In a non-CDB database, workloads within a database are managed with resource plans.
In a PDB, workloads are also managed with resource plans, also called PDB resource plans. The functionality is similar except for the following differences: / Non-CDB Database Multi-level resource plans Up to 32 consumer groups Subplans / PDB Database Single-level resource plans only Up to 8 consumer groups (not B) No subplans
Q9. You want to capture column group usage and gather extended statistics for better cardinality estimates for the CUSTOMERS table in the SH schema.
Examine the following steps:
1. Issue the SELECT DBMS_STATS.CREATE_EXTENDED_STATS (‘SH’, ‘CUSTOMERS’) FROM dual statement.
2. Execute the DBMS_STATS.SEED_COL_USAGE (null, ‘SH’, 500) procedure.
3. Execute the required queries on the CUSTOMERS table.
4. Issue the SELECT DBMS_STATS.REPORT_COL_USAGE (‘SH’, ‘CUSTOMERS’) FROM dual statement.
Identify the correct sequence of steps.
A. 3, 2, 1, 4
B. 2, 3, 4, 1
C. 4, 1, 3, 2
D. 3, 2, 4, 1
Answer: B
Explanation: Step 1 (2). Seed column usage Oracle must observe a representative workload, in order to determine the appropriate column groups. Using the new procedure DBMS_STATS.SEED_COL_USAGE, you tell Oracle how long it should observe the workload. Step 2: (3) You don't need to execute all of the queries in your work during this window. You can simply run explain plan for some of your longer running queries to ensure column group information is recorded for these queries. Step 3. (1) Create the column groups At this point you can get Oracle to automatically create the column groups for each of the tables based on the usage information captured during the monitoring window. You simply have to call the DBMS_STATS.CREATE_EXTENDED_STATS function for each table.This function requires just two arguments, the schema name and the table name. From then on, statistics will be maintained for each column group whenever statistics are gathered on the table.
Note:
* DBMS_STATS.REPORT_COL_USAGE reports column usage information and records all the SQL operations the database has processed for a given object.
* The Oracle SQL optimizer has always been ignorant of the implied relationships between data columns within the same table. While the optimizer has traditionally analyzed the distribution of values within a column, he does not collect value-based relationships between columns.
* Creating extended statisticsHere are the steps to create extended statistics for related table columns withdbms_stats.created_extended_stats:
1 - The first step is to create column histograms for the related columns.2 – Next, we run dbms_stats.create_extended_stats to relate the columns together.
Unlike a traditional procedure that is invoked via an execute (“exec”) statement, Oracle extended statistics are created via a select statement.
Q10. 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.