1Z0-062 Exam - Oracle Database 12c: Installation and Administration

certleader.com

Q1. On your Oracle Database, you issue the following commands to create indexes: 

SQL > CREATE INDEX oe.ord_customer_ix1 ON oe.orders (customer_id, sales_rep_id) INVISIBLE; 

SQL> CREATE BITMAP INDEX oe.ord_customer_ix2 ON oe.orders (customer_id, sales_rep_id); 

Which two statements are true? 

A. Only the ORD_CUSTOMER_IX1 index created. 

B. Both the indexes are updated when a row is inserted, updated, or deleted in the ORDERS table. 

C. Both the indexes are created: however, only ORD_CUSTOMERS_IX1 is used by the optimizer for queries on the ORDERS table. 

D. The ORD_CUSTOMER_IX1 index is not used by the optimizer even when the OPTIMIZER_USE_INVISIBLE_INDEXES parameters is set to true. 

E. Both the indexes are created and used by the optimizer for queries on the ORDERS table. 

F. Both the indexes are created: however, only ORD_CUSTOMERS_IX2 is used by the optimizer for queries on the ORDERS table. 

Answer: B,F 

Explanation: Not A: Both indexes are created fine. 

B: The invisible index ORD_CUSTOMERS_IX1 and the bitmap index are both updated by DML operations on the Orders table. 

F: Since ORD_CUSTOMERS_IX1 is invisible only ORD_CUSTOMERS_IX2 is used by the query optimizer. 

Not C,Not D,Not E: 

* ord_customer_ix1 is an invisible index and is therefore not used by the optimizer. 

* VISIBLE | INVISIBLE Use this clause to specify whether the index is visible or invisible to the optimizer. An invisible index is maintained by DML operations, but it is not be used by the optimizer during queries unless you explicitly set the parameter OPTIMIZER_USE_INVISIBLE_INDEXES to TRUE at the session or system level. 

Note: Specify BITMAP to indicate that index is to be created with a bitmap for each distinct key, rather than indexing each row separately. Bitmap indexes store the rowids associated with a key value as a bitmap. Each bit in the bitmap corresponds to a possible rowid. If the bit is set, then it means that the row with the corresponding rowid contains the key value. The internal representation of bitmaps is best suited for applications with low levels of concurrent transactions, such as data warehousing. 

Q2. Which two are prerequisites for performing a flashback transaction? 

A. Flashback Database must be enabled. 

B. Undo retention guarantee for the database must be configured. 

C. EXECUTE privilege on the DBMS_FLASHBACK package must be granted to the user flashing back transaction. 

D. Supplemental logging must be enabled. 

E. Recycle bin must be enabled for the database. 

F. Block change tracking must be enabled tor the database. 

Answer: A,C 

Reference: Oracle Database Advanced Application Developer's Guide 11g, Using Oracle Flashback Technology 

Q3. 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. 

Answer:

Explanation: * The CREATE DATABASE ... ENABLE PLUGGABLE DATABASE SQL statement creates a new CDB. If you do not specify the ENABLE PLUGGABLE DATABASE clause, then the newly created database is a non-CDB and can never contain PDBs. 

Along with the root (CDB$ROOT), Oracle Database automatically creates a seed PDB (PDB$SEED). The following graphic shows a newly created CDB: 

Description of admin095.png follows 

* Creating a PDB Rather than constructing the data dictionary tables that define an empty PDB from scratch, and then populating its Obj$ and Dependency$ tables, the empty PDB is created when the CDB is created. (Here, we use empty to mean containing no customer-created artifacts.) It is referred to as the seed PDB and has the name PDB$Seed. Every CDB non-negotiably contains a seed PDB; it is non-negotiably always open in read-only mode. This has no conceptual significance; rather, it is just an optimization device. The create PDB operation is implemented as a special case of the clone PDB operation. 

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

Answer:

Q5. You executed the following command to create a password file in the database server: 

$ orapwd file = orapworcl entries = 5 ignorecase=N 

Which statement describes the purpose of the above password file? 

A. It records usernames and passwords of users when granted the DBA role 

B. It contains usernames and passwords of users for whom auditing is enabled 

C. It is used by Oracle to authenticate users for remote database administrator 

D. It records usernames and passwords of all users when they are added to OSDBA or OSOPER operating groups 

Answer:

Q6. You are about to plug a multi-terabyte non-CDB into an existing multitenant container database (CDB) as a pluggable database (PDB). 

The characteristics of the non-CDB are as follows: 

Version: Oracle Database 12c Releases 1 64-bit Character set: WE8ISO8859P15 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 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: D Explanation: 

Note: 

* Generating a Pluggable Database Manifest File for the Non-CDB 

Execute the dbms_pdb.describe procedure to generate the manifest file. 

exec dbms_pdb.describe(pdb_descr_file=>'/u01/app/oracle/oradata/noncdb/noncdb.xml'); 

Shut down the noncdb instance to prepare to copy the data files in the next section. 

shutdown immediate exit 

Q7. 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:

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. 

Q8. You Execute the Following command to create a password file in the database server: 

$ orapwd file = ‘+DATA/PROD/orapwprod entries = 5 ignorecase = N format = 12’ Which two statements are true about the password file? 

A. It records the usernames and passwords of users when granted the DBA role. 

B. It contains the usernames and passwords of users for whom auditing is enabled. 

C. Is used by Oracle to authenticate users for remote database administration. 

D. It records the usernames and passwords of all users when they are added to the OSDBA or OSOPER operating system groups. 

E. It supports the SYSBACKUP, SYSDG, and SYSKM system privileges. 

Answer: C,E 

Q9. You must track all transactions that modify certain tables in the sales schema for at least three years. 

Automatic undo management is enabled for the database with a retention of one day. 

Which two must you do to track the transactions? 

A. Enable supplemental logging for the database. 

B. Specify undo retention guarantee for the database. 

C. Create a Flashback Data Archive in the tablespace where the tables are stored. 

D. Create a Flashback Data Archive in any suitable tablespace. 

E. Enable Flashback Data Archiving for the tables that require tracking. 

Answer: D,E 

Explanation: E: By default, flashback archiving is disabled for any table. You can enable flashback archiving for a table if you have the FLASHBACK ARCHIVE object privilege on the Flashback Data Archive that you want to use for that table. 

D: Creating a Flashback Data Archive 

/ Create a Flashback Data Archive with the CREATE FLASHBACK ARCHIVE statement, specifying the following: 

Name of the Flashback Data Archive 

Name of the first tablespace of the Flashback Data Archive 

(Optional) Maximum amount of space that the Flashback Data Archive can use in the first tablespace 

/ Create a Flashback Data Archive named fla2 that uses tablespace tbs2, whose data will be retained for two years: 

CREATE FLASHBACK ARCHIVE fla2 TABLESPACE tbs2 RETENTION 2 YEAR; 

Q10. Which two are true concerning a multitenant container database with three pluggable database? 

A. All administration tasks must be done to a specific pluggable database. 

B. The pluggable databases increase patching time. 

C. The pluggable databases reduce administration effort. 

D. The pluggable databases are patched together. 

E. Pluggable databases are only used for database consolidation. 

Answer: C,E 

Explanation: The benefits of Oracle Multitenant are brought by implementing a pure deployment choice. The following list calls out the most compelling examples. 

* High consolidation density. (E) The many pluggable databases in a single multitenant container database share its memory and background processes, letting you operate many more pluggable databases on a particular platform than you can single databases that use the old architecture. This is the same benefit that schema-based consolidation brings. 

* Rapid provisioning and cloning using SQL. 

* New paradigms for rapid patching and upgrades. (D, not B) The investment of time and effort to patch one multitenant container database results in patching all of its many pluggable databases. To patch a single pluggable database, you simply unplug/plug to a multitenant container database at a different Oracle Database software version. 

* (C, not A) Manage many databases as one. By consolidating existing databases as pluggable databases, administrators can manage many databases as one. For example, tasks like backup and disaster recovery are performed at the multitenant container database level. 

* Dynamic between pluggable database resource management. In Oracle Database 12c, Resource Manager is extended with specific functionality to control the competition for resources between the pluggable databases within a multitenant container database. Note: 

* Oracle Multitenant is a new option for Oracle Database 12c Enterprise Edition that helps customers reduce IT costs by simplifying consolidation, provisioning, upgrades, and more. It is supported by a new architecture that allows a multitenant container database to hold many pluggable databases. And it fully complements other options, including Oracle Real Application Clusters and Oracle Active Data Guard. An existing database can be simply adopted, with no change, as a pluggable database; and no changes are needed in the other tiers of the application. 

Reference: 12c Oracle Multitenant