Q1. You are about to plug a multi-terabyte non-CDB into an existing multitenant container database (CDB).
The characteristics of the non-CDB are as follows:
Version: Oracle Database 11g Release 2 (11.2.0.2.0) 64-bit Character set: AL32UTF8 National character set: AL16UTF16 O/S: Oracle Linux 6 64-bit
The characteristics of the CDB are as follows:
Version: Oracle Database 12c Release 1 64-bit Character Set: AL32UTF8 National character set: AL16UTF16 O/S: Oracle Linux 6 64-bit
Which technique should you use to minimize down time while plugging this non-CDB into the CDB?
A. Transportable database
B. Transportable tablespace
C. Data Pump full export/import
D. The DBMS_PDB package
E. RMAN
Answer: B
Explanation: * Overview, example:
-Log into ncdb12c as sys
-Get the database in a consistent state by shutting it down cleanly.
-Open the database in read only mode
-Run DBMS_PDB.DESCRIBE to create an XML file describing the database.
-Shut down ncdb12c
-Connect to target CDB (CDB2)
-Check whether non-cdb (NCDB12c) can be plugged into CDB(CDB2)
-Plug-in Non-CDB (NCDB12c) as PDB(NCDB12c) into target CDB(CDB2).
-Access the PDB and run the noncdb_to_pdb.sql script.
-Open the new PDB in read/write mode.
* You can easily plug an Oracle Database 12c non-CDB into a CDB. Just create a PDB manifest file for the non-CDB, and then use the manifest file to create a cloned PDB in the CDB.
* Note that to plugin a non-CDB database into a CDB, the non-CDB database needs to be of version 12c as well. So existing 11g databases will need to be upgraded to 12c before they can be part of a 12c CDB.
Q2. The user SCOTT owns the CUST table that is placed in the SALES tablespace. The user SCOTT opens a session and executes commands as follows:
SQL> INSERT INTO cust VALUES(101, 'JACK');
1 row created.
SQL> INSERT INTO cust VALUES(102, 'SMITH');
1 row created.
As a DBA, you execute the following command from another session:
ALTER TABLESPACE sales READ ONLY;
Which statement is true regarding the effect of this command on the transaction in Scott's session?
A. The command fails as a transaction is still pending.
B. The transaction in Scott's session is rolled back and the tablespace becomes readonly.
C. The command waits and the user SCOTT can execute data manipulation language (DML) statements only as part of the current transaction.
D. The command hangs until all transactions on the objects in the tablespace commit or rollback, and then the tablespace is placed in readonly mode.
Answer: D
Q3. You plan to migrate your database from a File system to Automata Storage Management (ASM) on same platform.
Which two methods or commands would you use to accomplish this task?
A. RMAN CONVERT command
B. Data Pump Export and import
C. Conventional Export and Import
D. The BACKUP AS COPY DATABASE . . . command of RMAN
E. DBMS_FILE_TRANSFER with transportable tablespace
Answer: A,D
Explanation: A:
1. Get the list of all datafiles.
. Use the convert datafile command to convert the datafile from the file system to ASM.
Note: RMAN Backup of ASM Storage
There is often a need to move the files from the file system to the ASM storage and vice versa. This may come in handy when one of the file systems is corrupted by some means and then the file may need to be moved to the other file system.
D: Migrating a Database into ASM
* To take advantage of Automatic Storage Management with an existing database you must migrate that database into ASM. This migration is performed using Recovery Manager (RMAN) even if you are not using RMAN for your primary backup and recovery strategy.
* Example:
Back up your database files as copies to the ASM disk group.
BACKUP AS COPY INCREMENTAL LEVEL 0 DATABASE FORMAT '+DISK' TAG 'ORA_ASM_MIGRATION'
Reference: Migrating Databases To and From ASM with Recovery Manager
Q4. To enable the Database Smart Flash Cache, you configure the following parameters:
DB_FLASH_CACHE_FILE = ‘/dev/flash_device_1’ , ‘/dev/flash_device_2’
DB_FLASH_CACHE_SIZE=64G
What is the result when you start up the database instance?
A. It results in an error because these parameter settings are invalid.
B. One 64G flash cache file will be used.
C. Two 64G flash cache files will be used.
D. Two 32G flash cache files will be used.
Answer: A
Q5. Examine the following command:
CREATE TABLE (prod_id number(4), Prod_name varchar2 (20),
Category_id number(30),
Quantity_on_hand number (3) INVISIBLE);
Which three statements are true about using an invisible column in the PRODUCTS table?
A. The %ROWTYPE attribute declarations in PL/SQL to access a row will not display the invisible column in the output.
B. The DESCRIBE commands in SQL *Plus will not display the invisible column in the output.
C. Referential integrity constraint cannot be set on the invisible column.
D. The invisible column cannot be made visible and can only be marked as unused.
E. A primary key constraint can be added on the invisible column.
Answer: A,B,E
Explanation: AB: You can make individual table columns invisible. Any generic access of a table does not show the invisible columns in the table. For example, the following operations do not display invisible columns in the output:
* SELECT * FROM statements in SQL
* DESCRIBE commands in SQL*Plus
* %ROWTYPE attribute declarations in PL/SQL
* Describes in Oracle Call Interface (OCI)
Incorrect:
Not D: You can make invisible columns visible.
You can make a column invisible during table creation or when you add a column to a table, and you can later alter the table to make the same column visible.
Reference: Understand Invisible Columns
Q6. Which Oracle Database component is audited by default if the unified Auditing option is enabled?
A. Oracle Data Pump
B. Oracle Recovery Manager (RMAN)
C. Oracle Label Security
D. Oracle Database Vault
E. Oracle Real Application Security
Answer: B
Q7. Examine the resources consumed by a database instance whose current Resource Manager plan is displayed.
SQL> SELECT name, active_sessions, queue_length, Consumed_cpu_time, cpu_waits, cpu_wait_time
FROM v$rsrc_consumer_group;
NAMEACTIVE_SESSIONS QUEUE_LENGTH CONSUMED_CPU_WAITS
CPU_WAIT_TIME
OLTP__ORDER__ENTRY1029690 467
OTHES__GROUPS 0 059823664089
60425
SYS_GROUP 1 02420704 914
19540
DS.S_QUERIES4245946603004
55700
Which two statements are true?
A. An attempt to start a new session by a user belonging to DSS_QUERIES fails with an error.
B. An attempt to start a new session by a user belonging to OTHE_GROUPS fails with an error.
C. The CPU_WAIT_TIME column indicates the total time that sessions in the consumer group waited for the CPU due to resource management.
D. The CPU_WAIT_TIME column indicates the total time that sessions in the consumer group waited for the CPU due to I/O waits and latch or enqueue contention.
E. A user belonging to the DSS__QUERIES resource consumer group can create a new session but the session will be queued.
Answer: C,E
Q8. 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.
Q9. Which two statements are true about Oracle Managed Files (OMF)?
A. OMF cannot be used in a database that already has data files created with user-specified directions.
B. The file system directions that are specified by OMF parameters are created automatically.
C. OMF can be used with ASM disk groups, as well as with raw devices, for better file management.
D. OMF automatically creates unique file names for table spaces and control files.
E. OMF may affect the location of the redo log files and archived log files.
Answer: D,E
Explanation:
D: The database internally uses standard file system interfaces to create and delete files as needed for the following database structures:
Tablespaces Redo log files Control files Archived logs Block change tracking files Flashback logs RMAN backups
Note:
* Using Oracle-managed files simplifies the administration of an Oracle Database. Oracle-managed files eliminate the need for you, the DBA, to directly manage the operating system files that make up an Oracle Database. With Oracle-managed files, you specify file system directories in which the database automatically creates, names, and manages files at the database object level. For example, you need only specify that you want to create a tablespace; you do not need to specify the name and path of the tablespace's datafile with the DATAFILE clause.
http://www.oracle-base.com/articles/9i/oracle-managed-files.php http://docs.oracle.com/cd/B10500_01/server.920/a96521/omf.htm Reference: What Are Oracle-Managed Files?
Q10. 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;