Monday, April 18, 2016

Oracle12c OCP sample question and answer part 2

Here is the part 2 question and answer 

26)
Examine the following query output:

You issue the following command to import tables into the hr schema:
$ > impdp hr/hr directory = dumpdir dumpfile = hr_new.dmp schemas=hr
TRANSFORM=DISABLE_ARCHIVE_LOGGING: Y
Which statement is true?
A.
All database operations performed by the impdp command are logged.
B.
Only CREATE INDEX and CREATE TABLE statements generated by the import are logged.
C.
Only CREATE TABLE and ALTER TABLE statements generated by the import are logged.
D.
None of the operations against the master table used by Oracle Data Pump to coordinate its  activities are logged.

Correct Answer:- C 

Notes:- 
Datapump Import impdp in 12c includes a new parameter to disable logging during
data import. This option could improve performance of import tremendously during large data
loads.
The TRANSFORM=DISABLE_ARCHIVE_LOGGING is used to disable logging. The value can be
Y or N. Y to disable logging and N to enable logging.
However, if the database is running with FORCE LOGGING enabled, data pump ignores disable
logging request.

when you database is configured with FORCE LOGGING=N , Even if you  specified this parameter during import   there is still redo logging for other operations of Oracle Data Pump. This includes all CREATE and ALTER statements, except CREATE INDEX, and all operations against the master table used by Oracle Data Pump during the import.”

learn from here--> http://db12c.blogspot.de/2013/06/using-new-oracle-database-12c-feature.html
-------------------------------------------------------------------------------------------------------------------------------------------------- 
27) Which three statements are true about adaptive SQL plan management?
A.
It automatically performs verification or evolves non-accepted plans, in COMPREHENSIVE
mode when they perform better than existing accepted plans.
B.
The optimizer always uses the fixed plan, if the fixed plan exists in the plan baseline.
C.
It adds new, bettor plans automatically as fixed plans to the baseline.
D.
The non-accepted plans are automatically accepted and become usable by the optimizer if they
perform better than the existing accepted plans.
E.
The non-accepted plans in a SQL plan baseline are automatically evolved, in
COMPREHENSIVE mode, during the nightly maintenance window and a persistent verification
report is generated.
Correct Answer:- A,D and E
-------------------------------------------------------------------------------------------------------------------------------------------------- 
28) You create a new pluggable database, HR_PDB, from the seed database. Which three
tablespaces are created by default in HR_PDB?
A.
SYSTEM
B.
SYSAUX
C.
EXAMPLE
D.
UNDO
E.
TEMP
F.
USERS
Correct Answer:- A,B & E

Notes:-
select CON_ID, NAME from v$containers where con_id=2;
select tablespace_name from cdb_tablespaces where con_id=2;
-------------------------------------------------------------------------------------------------------------------------------------------------- 
29) Which two statements are true about variable extent size support for large ASM files?
A.
The metadata used to track extents in SGA is reduced.
B.
Rebalance operations are completed faster than with a fixed extent size
C.
An ASM Instance automatically allocates an appropriate extent size.
D.
Resync operations are completed faster when a disk comes online after being taken offline.
E.
Performance improves in a stretch cluster configuration by reading from a local copy of an
extent.
Correct Answer:- A & C

Notes:-
Extents
The contents of Oracle ASM files are stored in a disk group as a set, or collection, of extents that are stored on individual disks within disk groups. Each extent resides on an individual disk. Extents consist of one or more allocation units (AU). To accommodate increasingly larger files, Oracle ASM uses variable size extents.
Variable size extents enable support for larger Oracle ASM data files, reduce SGA memory requirements for very large databases, and improve performance for file create and open operations. The initial extent size equals the disk group allocation unit size and it increases by a factor of 4 or 16 at predefined thresholds. This feature is automatic for newly created and resized data files when specific disk group compatibility attributes are set to 11.1 or higher. For information about compatibility attributes, see “Disk Group Compatibility”.
The extent size of a file varies as follows:
Extent size always equals the disk group AU size for the first 20000 extent sets (0 – 19999).
Extent size equals 4*AU size for the next 20000 extent sets (20000 – 39999).
Extent size equals 16*AU size for the next 20000 and higher extent sets (40000+).

-------------------------------------------------------------------------------------------------------------------------------------------------- 
30)
You created a new database using the “create database” statement without specifying the
“ENABLE PLUGGABLE” clause.
What are two effects of not using the “ENABLE PLUGGABLE database” clause?
A.
The database is created as a non-CDB and can never contain a PDB.
B.
The database is treated as a PDB and must be plugged into an existing multitenant container
database (CDB).
C.
The database is created as a non-CDB and can never be plugged into a CDB.
D.
The database is created as a non-CDB but can be plugged into an existing CDB.
E.
The database is created as a non-CDB but will become a CDB whenever the first PDB is
plugged in.
Correct Answer:- A & D
-------------------------------------------------------------------------------------------------------------------------------------------------- 
31)
What is the effect of specifying the “ENABLE PLUGGABLE DATABASE” clause in a “CREATE
DATABASE” statement?
A.
It will create a multitenant container database (CDB) with only the root opened.
B.
It will create a CDB with root opened and seed read only.
C.
It will create a CDB with root and seed opened and one PDB mounted.
D.
It will create a CDB that must be plugged into an existing CDB.
E.
It will create a CDB with root opened and seed mounted.
Correct Answer:-  B
-------------------------------------------------------------------------------------------------------------------------------------------------- 
32) You have installed two 64G flash devices to support the Database Smart Flash Cache feature on
your database server that is running on Oracle Linux.
You have set the DB_SMART_FLASH_FILE parameter:
DB_FLASH_CACHE_FILE= ‘/dev/flash_device_1 ‘,’ /dev/flash_device_2’
How should the DB_FLASH_CACHE_SIZE be configured to use both devices?
A.
Set DB_FLASH_CACHE_ZISE = 64G.
B.
Set DB_FLASH_CACHE_ZISE = 64G, 64G
C.
Set DB_FLASH_CACHE_ZISE = 128G.
D.
DB_FLASH_CACHE_SIZE is automatically configured by the instance at startup.
Correct Answer:- B

Notes:- 
The Smart Flash Cache feature is available on Solaris and Oracle Linux platforms. Oracle Database 11g Release 2 Enterprise Edition allows you to use flash devices to increase the effective size of the Oracle Database buffer cache (Level 2 cache) without adding more main memory. This capability is referred to as Database Smart Flash Cache.When the database requests data I/O, the system first looks in the buffer pool. If the data is not found, the system then looks in the Database Smart Flash Cache buffer. If it does not find the data there, only then does it look in disk storage. The database Smart Flash Cache was originally released as an Exadata feature. From 11.2.0.2 it was available for use with any flash disks, not just Exadata storage.
Note that Exadata  Smart Flash Cache functions quite differently – it is a write-through cache that brings data into flash cache on read-write disk operations, whereas Database Smart Flash Cache is a read-only cache that brings data into flash cache on buffer cache replacement.
Implementation:-
The Database Smart Flash Cache feature introduces two new init.ora parameters: DB_FLASH_CACHE_FILE, which identifies the flash device
DB_FLASH_CACHE_SIZE, which specifies the amount of flash storage available to the Database Smart Flash Cache.
You can specify up to 16 file sizes, for each of the flash memory devices specified with DB_FLASH_CACHE_FILE. For example, if there are three flash raw devices, you can specify the sizes of each device as follows:
db_flash_cache_file = /dev/raw/sda, /dev/raw/sdb, /dev/raw/sdc
db_flash_cache_size = 32G, 32G, 64G
Information about Smart Flash Cache usage is displayed using the V$FLASHFILESTAT view.
SELECT * FROM v$flashfilestat;
The default action is for blocks to be aged out of the buffer cache and into the Smart Flash Cache. The FLASH_CACHE clause of the ALTER TABLE command allows additional control.
-- Prevent EMP from using the Smart Flash Cache.
ALTER TABLE scott.emp STORAGE (FLASH_CACHE NONE);

--------------------------------------------------------------------------------------------------------------------------------------------------
33) 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
Correct Answer:- A,E & F
-------------------------------------------------------------------------------------------------------------------------------------------------- 
34) In your multitenant container database (CDB) containing pluggable database (PDBs), you granted
the CREATE TABLE privilege to the common user C # # A_ADMIN in root and all PDBs. You
execute the following command from the root container:
SQL > REVOKE create table FROM C # # A_ADMIN;
What is the result?
A.
It executes successfully and the CREATE TABLE privilege is revoked from C # # A_ADMIN in
root only.
B.
It fails and reports an error because the CONTAINER=ALL clause is not used.
C.
It excludes successfully and the CREATE TABLE privilege is revoked from C # # A_ADMIN in
root and all PDBs.
D.
It fails and reports an error because the CONTAINER=CURRENT clause is not used.
E.
It executes successfully and the CREATE TABLE privilege is revoked from C # # A_ADMIN in
all PDBs.
Correct Answer:-B

Notes:-

SQL> revoke create table from c##test;
revoke create table from c##test
*
ERROR at line 1:
ORA-65092: system privilege granted with a different scope to ‘C##TEST’
SQL> revoke create table from c##test container=all;
Revoke succeeded.
It’s depend how the privilege was granted.
If you give the privilege with:
grant create table to c##a_admin container=all;
You only take back with:
revoke create table from c##a_admin container=all;
However if you give the privilege at container and at each of pdbs without container=all clause, you can remove the privilege only in cdb and A will be correct.
In the case of this question, I would mark A, because of this sentence:
“you granted
the CREATE TABLE privilege to the common user C # # A_ADMIN in root and all PDBs”
--------------------------------------------------------------------------------------------------------------------------------------------------
35) You use a recovery catalog for maintaining your database backups.
You execute the following command:
$rman TARGET / CATALOG rman / cat@catdb
RMAN > BACKUP VALIDATE DATABASE ARCHIVELOG ALL;
Which two statements are true?
A.
Corrupted blocks, if any, are repaired.
B.
Checks are performed for physical corruptions.
C.
Checks are performed for logical corruptions.
D.
Checks are performed to confirm whether all database files exist in correct locations
E.
Backup sets containing both data files and archive logs are created.
Correct Answer:-B & D

-------------------------------------------------------------------------------------------------------------------------------------------------- 
36) Which three statements are true concerning the multitenant architecture?
A.
Each pluggable database (PDB) has its own set of background processes.
B.
A PDB can have a private temp tablespace.
C.
PDBs can share the sysaux tablespace.
D.
Log switches occur only at the multitenant container database (CDB) level.
E.
Different PDBs can have different default block sizes.
F.
PDBs share a common system tablespace.
G.
Instance recovery is always performed at the CDB level.
Correct Answer:- B, D & E
--------------------------------------------------------------------------------------------------------------------------------------------------
37) You run a script that completes successfully using SQL*Plus that performs these actions:
1. Creates a multitenant container database (CDB)
2. Plugs in three pluggable databases (PDBs)
3. Shuts down the CDB instance
4. Starts up the CDB instance using STARTUP OPEN READ WRITE
Which two statements are true about the outcome after running the script?
A.
The seed will be in mount state.
B.
The seed will be opened read-only.
C.
The seed will be opened read/write.
D.
The other PDBs will be in mount state.
E.
The other PDBs will be opened read-only.
F.
The PDBs will be opened read/write.
Correct Answer:- B & D

Notes:-
SQL> STARTUP OPEN READ WRITE;
ORACLE instance started.
Total System Global Area 1610612736 bytes
Fixed Size 2924928 bytes
Variable Size 520097408 bytes
Database Buffers 1073741824 bytes
Redo Buffers 13848576 bytes
Database mounted.
Database opened.
SQL> select NAME,OPEN_MODE from v$pdbs;
NAME OPEN_MODE
—————————— ———-
PDB$SEED READ ONLY
PDB1 MOUNTED
PDB2 MOUNTED
PDB3 MOUNTED
NEW_PDB MOUNTED
--------------------------------------------------------------------------------------------------------------------------------------------------
39) Which three statements are true about using flashback database in a multitenant container
database (CDB)?
A.
The root container can be flashed back without flashing back the pluggable databases (PDBs).
B.
To enable flashback database, the CDB must be mounted.
C.
Individual PDBs can be flashed back without flashing back the entire CDB.
D.
The DB_FLASHBACK RETENTION_TARGET parameter must be set to enable flashback of
the CDB.
E.
A CDB can be flashed back specifying the desired target point in time or an SCN, but not a
restore point.
Correct Answer:- ??  is there any correct answer given ?
Notes:- 
Flashback can be done only at CDB level and this will apply to all containers, the root and the PDBs -- so it doing a flashback at CDB level will affect all PDB is'nt it ?
Flashback can be enabled in 12c in OPEN and mount mode … so the MUST not be in mount mode.
Flash-backing a pluggable database is not supported .
The Oracle doc says that the DB_FLASHBACK_RETENTION_TARGET can optionnaly be set since it has a default value.
Flash-backing to a  restore points are possible. 
--------------------------------------------------------------------------------------------------------------------------------------------------
40) 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.
Correct Answer:-  D , C/D ? ? ,?
--------------------------------------------------------------------------------------------------------------------------------------------------
41) 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.
Correct Answer:-A

Notes:- 
An error is raised if the number of specified sizes does not match the number of specified files.
For example, if there are three flash raw devices, you can specify the sizes of each device as follows:
db_flash_cache_file = /dev/raw/sda, /dev/raw/sdb, /dev/raw/sdc
db_flash_cache_size = 32G, 32G, 64G
 --------------------------------------------------------------------------------------------------------------------------------------------------  
42) 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.
Correct Answer:-A 

Notes:- 
when we add / drop disk from diskgroup , this will invoke the rebalancing operation - RBAL will cordinate the rebalancing works and ARBn process do the actual task .The number of ARBn processes started is directly determined by the ASM_POWER_LIMIT parameter setting .For example if we  increase the   ASM_POWER_LIMIT to 1 to 5 , you can see 5 ARBn process got started - asm_arb0, asm_arb1, asm_arb2,asm_arb3 & asm_arb4 -- At normal situation we cant see arbn process .
--------------------------------------------------------------------------------------------------------------------------------------------------   
42) Which two partitioned table maintenance operations support asynchronous Global Index
Maintenance in Oracle database 12c?
A.
ALTER TABLE SPLIT PARTITION
B.
ALTER TABLE MERGE PARTITION
C.
ALTER TABLE TRUNCATE PARTITION
D.
ALTER TABLE ADD PARTITION
E.
ALTER TABLE DROP PARTITION
F.
ALTER TABLE MOVE PARTITION
Correct Answer:- C & E

Notes:- 
Asynchronous Global Index Maintenance for DROP and TRUNCATE PARTITION
This feature enables global index maintenance to be delayed and decoupled from a DROP and
TRUNCATE partition without making a global index unusable. Enhancements include faster
DROP and TRUNCATE partition operations and the ability to delay index maintenance to off-peak
time.
--------------------------------------------------------------------------------------------------------------------------------------------------      
43) You configure your database Instance to support shared server connections.
Which two memory areas that are part of PGA are stored in SGA instead, for shared server
connection?
A.
User session data
B.
Stack space
C.
Private SQL area
D.
Location of the runtime area for DML and DDL Statements
E.
Location of a part of the runtime area for SELECT statements
Correct Answer:- A & C

--------------------------------------------------------------------------------------------------------------------------------------------------      
44) Which four actions are possible during an Online Data file Move operation?
A.
Creating and dropping tables in the data file being moved
B.
Performing file shrink of the data file being moved
C.
Querying tables in the data file being moved
D.
Performing Block Media Recovery for a data block in the data file being moved
E.
Flashing back the database
F.
Executing DML statements on objects stored in the data file being moved
Correct Answer:- A,C,D & F

Notes:- 
An Online Move data file operation is not compatible when:
• The data file is an OFFLINE data file
• A concurrent flashback database operation is executing
• A media recovery is completing
• A file shrink operation or tablespace offline/drop operation involving the same file is
performing
But it is compatible with:
• Block media recovery
--------------------------------------------------------------------------------------------------------------------------------------------------      
45) Your multitenant container database (CDB) contains a pluggable database, HR_PDB. The default
permanent tablespace in HR_PDB is USERDATA. The container database (CDB) is open and you
connect RMAN.
You want to Issue the following RMAN command:
RMAN > BACKUP TABLESPACE hr_pdb:userdata;
Which task should you perform before issuing the command?
A.
Place the root container in ARHCHIVELOG mode.
B.
Take the user data tablespace offline.
C.
Place the root container in the nomount stage.
D.
Ensure that HR_PDB is open.
Correct Answer:- A

Notes:-
Pluggable Database cannot be backed up in NOARCHIVELOG mode.
When connect to CDB using RMAN. You can backup pdb even pdb in mount stat.
--------------------------------------------------------------------------------------------------------------------------------------------------      
46) 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.
Correct Answer:- A

Notes:-  

Block corruptions can be divided into interblock corruption and intrablock corruption. In intrablock corruption, the 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. The
VALIDATE command checks for intrablock corruptions only.

Validates the server parameter file currently used by the database. RMAN cannot validates other copies of the server parameter file, and cannot validate the server parameter file when the instance was started with an initialization parameter file.

--------------------------------------------------------------------------------------------------------------------------------------------------  
47)  In your multitenant container database (CDB) with two pluggable database (PDBs). You want to
create a new PDB by using SQL Developer.
Which statement is true?
A.
The CDB must be open.
B.
The CDB must be in the mount stage.
C.
The CDB must be in the nomount stage.
D.
Alt existing PDBs must be closed.
Correct answer:-  A

Notes:- 
SQL Developer will not open id DB mount or nomount stage.
-------------------------------------------------------------------------------------------------------------------------------------------------- 
48)  Which three operations can be performed as multipartition operations in Oracle?
A.
Merge partitions of a list partitioned table
B.
Drop partitions of a list partitioned table
C.
Coalesce partitions of a hash-partitioned global index.
D.
Move partitions of a range-partitioned table
E.
Rename partitions of a range partitioned table
F.
Merge partitions of a reference partitioned index
Correct answer:-  A ,B and C

Notes:- 
In Oracle 12c some maintenance operations can now be performed on multiple partitions in a single ALTER TABLE statement. Option D & E are for single partition .
--------------------------------------------------------------------------------------------------------------------------------------------------            
49) You are connected using SQL* Plus to a multitenant container database (CDB) with SYSDBA privileges and execute the following sequence statements: 

What is the result of the last SET CONTAINER statement and why is it so?
A.
It succeeds because the PDB_ADMIN user has the required privileges.
B.
It fails because common users are unable to use the SET CONTAINER statement.
C.
It fails because local users are unable to use the SET CONTAINER statement.
D.
If fails because the SET CONTAINER statement cannot be used with PDB$SEED as the target
pluggable database (PDB).
Correct answer:-  C
Notes:-
--------------------------------------------------------------------------------------------------------------------------------------------------            
50) Oracle Grid Infrastructure for a stand-alone server is installed on your production host before
installing the Oracle Database server. The database and listener are configured by using Oracle
Restart.
Examine the following command and its output:
$ crsctl config has
CRS-4622: Oracle High Availability Services auto start is enabled.
What does this imply?
A.
When you start an instance on a high with SQL *Plus dependent listeners and ASM disk groups
are automatically started.
B.
When a database instance is started by using the SRVCTL utility and listener startup fails, the
instance is still started.
C.
When a database is created by using SQL* Plus, it is automatically added to the Oracle Restart
configuration.
D.
When you create a database service by modifying the SERVICE_NAMES initialization
parameter, it is automatically added to the Oracle Restart configuration.
Correct answer:- B

Notes:-  

it’s B: Oracle Restart also manages the weak dependency between database instances and the Oracle Net listener (the listener): When a database instance is started, Oracle Restart attempts to start the listener. If the listener startup fails, then the database is still started. If the listener later fails, Oracle Restart does not shut down and restart any database instances.
--------------------------------------------------------------------------------------------------------------------------------------------------            




Tuesday, April 12, 2016

Oracle12c OCP sample question and answer part 1


I am going through Oracle12c OCP  sample question and I would like to share the answer that came in my mind  .I also tried to gather some useful nots for each question that I went through .I am not pretty sure all answer given here are correct , I would like to here from you If my answers are wrong .


1)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.

Correct answer is A and E.
Notes:-
Temporary tablespace is never backed up in RMAN. No need of restoration and recovery.You can create a new temp file and drop the old one. or restart the CDB, temp file will be created automatically

----------------------------------------------------------------------------------------------------------------------------------------------
2)You are administering a database stored in Automatic Storage Management (ASM). You use RMAN to back up the database and the MD_BACKUP command to back up the ASM metadata regularly. You lost an ASM disk group DG1 due to hardware failure. In which three ways can you re-create the lost disk group and restore the data?

A.
Use the MD_RESTORE command to restore metadata for an existing disk group by passing
the existing disk group name as an input parameter and use RMAN to restore the data.

B.
Use the MKDG command to restore the disk group with the same configuration as the backedup disk group and data on the disk group.

C.
Use the MD_RESTORE command to restore the disk group with the changed disk group
specification, failure group specification, name, and other attributes and use RMAN to restore the
data.

D.
Use the MKDG command to restore the disk group with the same configuration as the backedup disk group name and same set of disks and failure group configuration, and use RMAN to
restore the data.

E.
Use the MD_RESTORE command to restore both the metadata and data for the failed disk
group.

F.
Use the MKDG command to add a new disk group DG1 with the same or different specifications
for failure group and other attributes and use RMAN to restore the data.

Correct answer is C,D,F

Read more about Disk group restore  :- http://www.oracle-class.com/?p=1930
----------------------------------------------------------------------------------------------------------------------------------------------
3)Your multitenant container database, CDB1, is running in ARCHIVELOG mode and has two pluggable databases, HR_PDB and ACCOUNTS_PDB. An RMAN backup exists for the database. You issue the command to open ACCOUNTS_PDB and find that the USERDATA.DBF data file for the default permanent tablespace USERDATA belonging to ACCOUNTS_PDB is corrupted.What should you do before executing the commands to restore and recover the data file in ACCOUNTS_PDB?

A.
Place CDB1 in the mount stage and then the USERDATA tablespace offline in
ACCOUNTS_PDB.

B.
Place CDB1 in the mount stage and issue the ALTER PLUGGABLE DATABASE accounts_pdb
CLOSE IMMEDIATE command.

C.
Issue the ALTER PLUGGABLE DATABASE accounts_pdb RESTRICTED command.

D.
Take the USERDATA tablespace offline in ACCOUNTS_PDB.

Correct answer:- D
Read more about this:- http://blog.itpub.net/28552278/viewspace-1248526/ 

Want to know how Point-In-Time recovery works with PDB ? Here is a brief note

Performing Point-In-Time Recovery for a Pluggable Database
SQL>alter pluggable database pdb2 close;

connect to root container and

run {
set until SCN = 2263440 ;
restore pluggable database pdb2;
recover pluggable database pdb2 auxiliary destination='/stage/db_backup_files/cdb1';
alter pluggable database pdb2 open resetlogs;
}

Read more about this:- http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/r1/pdb/pdb_pitr/pdb_pitr.html

----------------------------------------------------------------------------------------------------------------------------------------------

4)Your multitenant container (CDB) containing three pluggable databases (PDBs) is running in ARCHIVELOG mode. You find that the SYSAUX tablespace is corrupted in the root container.
The steps to recover the tablespace are as follows:
1. Mount the CDB.
2. Close all the PDBs.
3. Open the database.
4. Apply the archive redo logs.
5. Restore the data file.
6. Take the SYSAUX tablespace offline.
7. Place the SYSAUX tablespace online.
8. Open all the PDBs with RESETLOGS.
9. Open the database with RESETLOGS.
10. Execute the command SHUTDOWN ABORT.
Which option identifies the correct sequence to recover the SYSAUX tablespace?

A.
6, 5, 4, 7

B.
10, 1, 2, 5, 8

C.
10, 1, 2, 5, 4, 9, 8

D.
10, 1, 5, 8, 10

Correct answer:- A

Notes:-
RMAN> ALTER TABLESPACE sysaux OFFLINE IMMEDIATE;
RMAN> RESTORE TABLESPACE sysaux;
RMAN> RECOVER TABLESPACE sysaux;
RMAN> ALTER TABLESPACE sysaux ONLINE;
----------------------------------------------------------------------------------------------------------------------------------------------
5)Which three are direct benefits of the multiprocess, multithreaded architecture of Oracle Database 12c when it is enabled?

A.
Reduced logical I/O

B.
Reduced virtual memory utilization

C.
Improved parallel Execution performance

D.
Improved Serial Execution performance

E.
Reduced physical I/O

F.
Reduced CPU utilization

Correct answer:- B,C,F
Notes:-
Oracle Database on Unix machines (Linux, Solaris, AIX, etc..) have always been a multiprocess database with each new version or release adding a new set of processes to the database architecture. However, On the contrary Oracle Database on Windows machines always runs a single (Multi-threaded) process.

Multi-threading has a wide range of advantages over the multiprocess architecture. A process in general context is an address space and creating a new process requires creating an address space in the memory. On the contrary creating a thread is less expensive as it doesn’t require a new address space and will run in the current process address space. Further, the time taken to switch between threads is much less than the time taken to switch between processes mainly due to the fact that switching between threads do not require to switching between address spaces.
What is new?

The wait is finally over. Oracle has introduced the Multi-threaded architecture for Unix systems with the Oracle Database Release 12c, where a Oracle Database on Unix machines can utilize a Multi-threaded process model.

How to configure Multithreading for Oracle Database

Configuring Multi-threaded process model is very simple. In Oracle Database 12c, Multi-threading is facilitated by means of the database initialization parameter THREADED_EXECUTION
THREADED_EXECUTION=FALSE or TRUE

FALSE: This is the default value and causes Oracle to run with Multiprocess architecture.
TRUE: If the value is set to TRUE, it implements Multi-threaded architecture for the database.
However, this configuration is not enough for obtaining a complete Multi-threaded process model. When, we set the parameter THREADED_EXECUTION=TRUE; by default it converts almost all of the background processes (like CKPT, LGWR, DBWR, SMON, etc.) into THREADS.

When this initialization parameter is set to TRUE, which enables the multithreaded Oracle model,
operating system authentication is not supported. Attempts to connect to the database using
operating system authentication (for example, CONNECT / AS SYSDBA or CONNECT / ) when
this initialization parameter is set to TRUE receive an ORA-01031″insufficient privileges” error- 

Read more about this :- http://www.oraclebuffer.com/oracle-internals/oracle-database-12c-the-multi-threaded-process-model/
----------------------------------------------------------------------------------------------------------------------------------------------
6)In order to exploit some new storage tiers that have been provisioned by a storage administrator, the partitions of a large heap table must be moved to other tablespaces in your Oracle 12c database?
Both local and global partitioned B-tree Indexes are defined on the table.
A high volume of transactions access the table during the day and a medium volume of
transactions access it at night and during weekends.
Minimal disrupt ion to availability is required.
Which three statements are true about this requirement?

A.
The partitions can be moved online to new tablespaces.

B.
Global indexes must be rebuilt manually after moving the partitions.

C.
The partitions can be compressed in the same tablespaces.

D.
The partitions can be compressed in the new tablespaces.

E.
Local indexes must be rebuilt manually after moving the partitions.

Correct answer:- A,C,D

Read more on:- http://orabase.org/index.php/exam-prepare/1z0-060-prepare/1z0-060-q10/
----------------------------------------------------------------------------------------------------------------------------------------------
7)You notice that the performance of your production 24/7 Oracle database significantly degraded.Sometimes you are not able to connect to the instance because it hangs. You do not want to restart the database instance. How can you detect the cause of the degraded performance?

A.
Enable Memory Access Mode, which reads performance data from SGA.

B.
Use emergency monitoring to fetch data directly from SGA analysis.

C.
Run Automatic Database Diagnostic Monitor (ADDM) to fetch information from the latest
Automatic Workload Repository (AWR) snapshots.

D.
Use Active Session History (ASH) data and hang analysis in regular performance monitoring.

E.
Run ADDM in diagnostic mode.

Correct answer:- E??

Emergency Monitoring

The Emergency Monitoring feature enables the database administrator to connect to an unresponsive database through a special proprietary mechanism and diagnose performance issues when normal mode connection is not possible. It has an in-built hang analysis capability that enables you to identify blocking sessions and kill these blockers with a click of a button.
Real-time Automatic Database Diagnostic Monitor

Real-Time Automatic Database Diagnostic Monitor (ADDM) is an innovative way to analyze problems in extremely slow or hung databases, which would have traditionally required a database restart. Real-Time ADDM can help resolve issues such as deadlocks, hangs, shared pool contentions, and many other exception situations without resorting to a restart of the database.

Lean more here :- https://www.youtube.com/watch?v=FkMOzsIecQU
----------------------------------------------------------------------------------------------------------------------------------------------
8)In your multitenant container database (CDB) containing pluggable databases (PDB), users complain about performance degradation.
How does real-time Automatic database Diagnostic Monitor (ADDM) check performance
degradation and provide solutions?

A.
It collects data from SGA and compares it with a preserved snapshot.

B.
It collects data from SGA, analyzes it, and provides a report.

C.
It collects data from SGA and compares it with the latest snapshot.

D.
It collects data from both SGA and PGA, analyzes it, and provides a report.
Correct answer:- B
Notes:-
Real-Time ADDM access just the ASH recent activity from the SGA. It doesn’t compare snapshots.
----------------------------------------------------------------------------------------------------------------------------------------------
9) Your multitenant container database (CDB) is running in ARCHIVELOG mode. You connect to the CDB RMAN.
Examine the following command and its output: 


You execute the following command:
RMAN > BACKUP DATABASE PLUS ARCHIVELOG;
Which data files will be backed up?

A.
Data files that belong to only the root container

B.
Data files that belong to the root container and all the pluggable databases (PDBs)

C.
Data files that belong to only the root container and PDB$SEED

D.
Data files that belong to the root container and all the PDBs excluding PDB$SEED

Correct answer:B
----------------------------------------------------------------------------------------------------------------------------------------------
10)You are administering a database stored in Automatic Storage management (ASM). The files are stored in the DATA disk group. You execute the following command:
SQL > ALTER DISKGROUP data ADD ALIAS ‘+data/prod/myfile.dbf’ FOR ‘+data.231.45678’;
What is the result?

A.
The file ‘+data.231.54769’ is physically relocated to ‘+data/prod’ and renamed as ‘myfile.dbf’.

B.
The file ‘+data.231.54769’ is renamed as ‘myfile.dbf’, and copied to ‘+data/prod’.

C.
The file ‘+data.231.54769’ remains in the same location and a synonym ‘myfile.dbf’ is created.

D.
The file ‘myfile.dbf’ is created in ‘+data/prod’ and the reference to ‘+data.231.54769’ in the data dictionary removed.

Correct answer:C
----------------------------------------------------------------------------------------------------------------------------------------------
11)Which three functions are performed by the SQL Tuning Advisor?

A.
Building and implementing SQL profiles

B.
Recommending the optimization of materialized views

C.
Checking query objects for missing and stale statistics

D.
Recommending bitmap, function-based, and B-tree indexes

E.
Recommending the restructuring of SQL queries that are using bad plans

Correct answer: ?? is it A,C,D, E ?

----------------------------------------------------------------------------------------------------------------------------------------------
12) Examine the following command:
ALTER SYSTEM SET enable_ddl_logging=FALSE;
Which statement is true?

A.
None of the data definition language (DDL) statements are logged in the trace file.

B.
Only DDL commands that resulted in errors are logged in the alert log file.

C.
A new log.xml file that contains the DDL statements is created, and the DDL command details
are removed from the alert log file.

D.
Only DDL commands that resulted in the creation of new database files are logged.

Correct answer: A

Note:- if you enable enable_ddl_logging=true , orale will create one file name ddl_INSTNAME.log inside $ORACLE_BASE/DIAG/rdbms/DBName/INSTNAME/log
and one log.xml inside $ORACLE_BASE/DIAG/rdbms/DBName/INSTNAME/log/ddl
Bothe these files contain information about DDL

----------------------------------------------------------------------------------------------------------------------------------------------
13)Your multitenant container database (CDB) contains three pluggable database (PDBs). You find that the control file is damaged. You plan to use RMAN to recover the control file. There are no startup triggers associated with the PDBs.
Which three steps should you perform to recover the control file and make the database fully operational?

A.
Mount the container database (CDB) and restore the control file from the control file auto
backup.

B.
Recover and open the CDB in NORMAL mode.

C.
Mount the CDB and then recover and open the database, with the RESETLOGS option.

D.
Open all the pluggable databases.

E.
Recover each pluggable database.

F.
Start the database instance in the nomount stage and restore the control file from control file auto backup.

Correct answer: F,C and D
----------------------------------------------------------------------------------------------------------------------------------------------
14)Identify three valid options for adding a pluggable database (PDB) to an existing multitenant container database (CDB).

A.
Use the CREATE PLUGGABLE DATABASE statement to create a PDB using the files from the
SEED.

B.
Use the CREATE DATABASE . . . ENABLE PLUGGABLE DATABASE statement to provision a
PDB by copying file from the SEED.

C.
Use the DBMS_PDB package to clone an existing PDB.

D.
Use the DBMS_PDB package to plug an Oracle 12c non-CDB database into an existing CDB.

E.
Use the DBMS_PDB package to plug an Oracle 11 g Release 2 (11.2.0.3.0) non-CDB database into an existing CDB.
Correct answer: A and D
To clone an existing PDB you dont need to use DBMS_PDB package, you simply use Alter database unplug into ‘file.xml’ and then create pluggable database using ‘file.xml’
----------------------------------------------------------------------------------------------------------------------------------------------
15)SQL > exec DBMS_STATS.SET_TABLE_PREFS (‘SH’, ‘CUSTOMERS’, ‘PUBLISH’, ‘false’);
Which three statements are true about the effect of this command?

A.
Statistics collection is not done for the CUSTOMERS table when schema stats are gathered.

B.
Statistics collection is not done for the CUSTOMERS table when database stats are gathered.

C.
Any existing statistics for the CUSTOMERS table are still available to the optimizer at parse
time.

D.
Statistics gathered on the CUSTOMERS table when schema stats are gathered are stored as
pending statistics.

E.
Statistics gathered on the CUSTOMERS table when database stats are gathered are stored as
pending statistics.
Correct answer: ??? is it C,D,E
----------------------------------------------------------------------------------------------------------------------------------------------
16)Examine the following impdp command to import a database over the network from a pre-12c Oracle database (source):

Which three are prerequisites for successful execution of the command?

A.
The import operation must be performed by a user on the target database with the
DATAPUMP_IMP_FULL_DATABASE role, and the database link must connect to a user on the source database with the DATAPUMP_EXD_FULL_DATABASE role.

B.
All the user-defined tablespaces must be in read-only mode on the source database.

C.
The export dump file must be created before starting the import on the target database.

D.
The source and target database must be running on the same platform with the same
endianness.

E.
The path of data files on the target database must be the same as that on the source database.

F.
The impdp operation must be performed by the same user that performed the expdp operation.
Correct answer: A,B ,D
----------------------------------------------------------------------------------------------------------------------------------------------
17)Which three statements are true concerning unplugging a pluggable database (PDB)?

A.
The PDB must be open in read only mode.

B.
The PDB must be dosed.

C.
The unplugged PDB becomes a non-CDB.

D.
The unplugged PDB can be plugged into the same multitenant container database (CDB)

E.
The unplugged PDB can be plugged into another CDB.

F.
The PDB data files are automatically removed from disk.
Correct answer:BDE
option A is only used for PDB cloning – where read only PDB is not unplug but copy to the another slot.
----------------------------------------------------------------------------------------------------------------------------------------------
18)Examine the following command:
CREATE TABLE PRODUCTS (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.
Correct answer: A,B,E
Notes:- the following ones will not display or work with invisible table columns:

    -SELECT * FROM in SQL instructions
    -The DESCRIBE statement when used in either SQL*PLUS
    -%ROWTYPE attribute in PL/SQL variable declarations

----------------------------------------------------------------------------------------------------------------------------------------------
19)Which statement is true concerning dropping a pluggable database (PDB)?

A.
The PDB must be open in read-only mode.

B.
The PDB must be in mount state.

C.
The PDB must be unplugged.

D.
The PDB data files are always removed from disk.

E.
A dropped PDB can never be plugged back into a multitenant container database (CDB).
Correct answer:B & C

Notes:-
From Oracle documentation could see that The following prerequisites must be met for dropping a PDB:
The PDB must be in mounted mode, or it must be unplugged.
D --> is wrong. When dropping a PDB, the default is to KEEP DATAFILES. You have the option to use the INCLUDING DATAFILES option as well.
E --> Sure you can if the datafiles are still there and you have the xml file.
----------------------------------------------------------------------------------------------------------------------------------------------
20)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
Correct answer:A,C,D
Notes:-
ACD as the indexes can be defeated by missing stats/histograms, high clustering factor, high value for db_file_multiblock_read_count which can make full table scan for small tables cheaper that using indexes

----------------------------------------------------------------------------------------------------------------------------------------------
21)You notice a performance change in your production Oracle 12c database. You want to know which change caused this performance difference.
Which method or feature should you use?

A.
Compare Period ADDM report

B.
AWR Compare Period report

C.
Active Session History (ASH) report

D.
Taking a new snapshot and comparing it with a preserved snapshot
Correct answer: A
----------------------------------------------------------------------------------------------------------------------------------------------
22)Which three statements are true about Automatic Workload Repository (AWR)?

A.
All AWR tables belong to the SYSTEM schema.

B.
The AWR data is stored in memory and in the database.

C.
The snapshots collected by AWR are used by the self-tuning components in the database

D.
AWR computes time model statistics based on time usage for activities, which are displayed in
the v$SYS time model and V$SESS_TIME_MODEL views.

E.
AWR contains system wide tracing and logging information.
Correct answer:B,C,D
Notes:-
The statistics collected and processed by AWR include: Time model statistics based on time usage for activities, displayed in the V$SYS_TIME_MODEL and V$SESS_TIME_MODEL views
----------------------------------------------------------------------------------------------------------------------------------------------
23)
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.

Correct answer: B & D

Notes:-
B, D is the correct answer because in  12c you can create pwdfile with privileges.

Check – http://docs.oracle.com/database/121/ADMIN/dba.htm#ADMIN11059

Creating a Database Password File with ORAPWD
The syntax of the ORAPWD command is as follows, where FORCE=y permits overwriting an existing password file.

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]
----------------------------------------------------------------------------------------------------------------------------------------------
24)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
Correct answer: B
Notes:-
Transportable database - Only available from 11.2.0.3 onwards
Data Pump full export/import is slow compared to Transportable tablespace
The DBMS_PDB package is not available for 11.2.0.2.0 option .
----------------------------------------------------------------------------------------------------------------------------------------------
25)An administrator account is granted the CREATE SESSION and SET CONTAINER system privileges. A multitenant container database (CDB) instant has the following parameter set:
THREADED_EXECUTION = FALSE
Which four statements are true about this administrator establishing connections to root in a CDB that has been opened in read only mode?

A.
You can conned as a common user by using the connect statement.

B.
You can connect as a local user by using the connect statement.

C.
You can connect by using easy connect.

D.
You can connect by using OS authentication.

E.
You can connect by using a Net Service name.

F.
You can connect as a local user by using the SET CONTAINER statement.
Correct answer: A,C,D and E
Notes:-
The question tells you an administrator user can login (CREATE SESSION) and can issue SET CONTAINER commands. It also tells you it is a CDB and that the multi-threaded architecture is disabled. That means OS authentication will work. So D is correct. As long as TCP/IP is configured, then using EZ Connect would work, so C is correct. Assuming there’s a listener and a tnsnames.ora file correctly configured would make E correct. Since the connection is to the ROOT container, that immediately eliminates any answer referencing LOCAL users because ROOT cannot have any LOCAL users.

When this initialization parameter is set to TRUE, which enables the multithreaded Oracle model,
operating system authentication is not supported. Attempts to connect to the database using
operating system authentication (for example, CONNECT / AS SYSDBA or CONNECT / ) when
this initialization parameter is set to TRUE receive an ORA-01031″insufficient privileges” error.
----------------------------------------------------------------------------------------------------------------------------------------------