1Z0-062 Premium Bundle

1Z0-062 Premium Bundle

Oracle Database 12c: Installation and Administration Certification Exam

4.5 
(20085 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
May 20, 2024Last update

Oracle 1Z0-062 Free Practice Questions

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

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

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

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

Q5. You plan to implement the distributed database system in your company. You invoke Database Configuration Assistant (DBCA) to create a database on the server. During the installation, DBCA prompts you to specify the Global Database Name. 

What must this name be made up of? 

A. It must be made up of a database name and a domain name. 

B. It must be made up of the value in ORACLE_SID and HOSTNAME. 

C. It must be made up of the value that you plan to assign for INSTANCE_NAME and HOSTNAME. 

D. It must be made up of the value that you plan to assign for ORACLE_SID and SERVICE_NAMES. 

Answer:

Explanation: Using the DBCA to Create a Database (continued) 

3. Database Identification: Enter the Global Database Name in The form database_name.domain_name, and the system identifier (SID). The SID defaults lo the database name and uniquely identifies the instance associated with the database. 

4. Management Options: Use this page to set up your database so that it can be managed with Oracle Enterprise Manager. Select the default: "Configure the Database with Enterprise Manager." Optionally, this page allows you to configure alert notifications and daily disk backup area settings. 

Note: Yon must configure the listener before you can configure Enterprise Manager (as shown earlier). 

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

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; 

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

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. 

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

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 

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

Answer: B,D,E 

Explanation: B, not A: The PDB must be closed before unplugging it. 

D: An unplugged PDB contains data dictionary tables, and some of the columns in these encode information in an endianness-sensitive way. There is no supported way to handle the conversion of such columns automatically. This means, quite simply, that an unplugged PDB cannot be moved across an endianness difference. 

E (not F): To exploit the new unplug/plug paradigm for patching the Oracle version most effectively, the source and destination CDBs should share a filesystem so that the PDB’s datafiles can remain in place. 

Reference: Oracle White Paper, Oracle Multitenant 

Q10. Your are the DBA supporting an Oracle 11g Release 2 database and wish to move a table containing several DATE, CHAR, VARCHAR2, and NUMBER data types, and the table’s indexes, to another tablespace. 

The table does not have a primary key and is used by an OLTP application. 

Which technique will move the table and indexes while maintaining the highest level of availability to the application? 

A. Oracle Data Pump. 

B. An ALTER TABLE MOVE to move the table and ALTER INDEX REBUILD to move the indexes. 

C. An ALTER TABLE MOVE to move the table and ALTER INDEX REBUILD ONLINE to move the indexes. 

D. Online Table Redefinition. 

E. Edition-Based Table Redefinition. 

Answer:

Explanation: * Oracle Database provides a mechanism to make table structure modifications without significantly affecting the availability of the table. The mechanism is called online table redefinition. Redefining tables online provides a substantial increase in availability compared to traditional methods of redefining tables. 

* To redefine a table online: 

Choose the redefinition method: by key or by rowid 

* By key—Select a primary key or pseudo-primary key to use for the redefinition. Pseudo-primary keys are unique keys with all component columns having NOT NULL constraints. For this method, the versions of the tables before and after redefinition should have the same primary key columns. This is the preferred and default method of redefinition. 

* By rowid—Use this method if no key is available. In this method, a hidden column named M_ROW$$ is added to the post-redefined version of the table. It is recommended that this column be dropped or marked as unused after the redefinition is complete. If COMPATIBLE is set to 10.2.0 or higher, the final phase of redefinition automatically sets this column unused. You can then use the ALTER TABLE ... DROP UNUSED COLUMNS statement to drop it. 

You cannot use this method on index-organized tables. 

Note: 

* When you rebuild an index, you use an existing index as the data source. Creating an index in this manner enables you to change storage characteristics or move to a new tablespace. Rebuilding an index based on an existing data source removes intra-block fragmentation. Compared to dropping the index and using the CREATE INDEX statement, re-creating an existing index offers better performance. 

Incorrect: 

Not E: Edition-based redefinition enables you to upgrade the database component of an application while it is in use, thereby minimizing or eliminating down time. 

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

Q12. Examine the query and its output: 

SQL> SELECT REASON, metric_value FROM dba_outstanding_alerts; 

REASONMETRIC_VALUE 

Tablespace [TEST] is [28 perce 28.125 nt] full 

Metrics "Current Logons Count"29 

Metrics "Database Time Spent99.0375405 waiting (%)" is at 99.03754 for event class "Application" db_recovery_file_dest_size of97 4294967296 bytes is 97.298 used and has 116228096 remaining bytes available. 

After 30 minutes, you execute the same query: 

SQL> SELECT reason, metric_value FROM dba_outstanding_alerets; 

REASONMETRIC_VALUE 

Tablespace [TEST] is [28 percs 28.125 nt] full 

What might have caused three of the alerts to disappear? 

A. The threshold alerts were cleared and transferred to d0A_alert_history. 

B. An Automatic Workload Repository (AWR) snapshot was taken before the execution of the second 

C. An Automatic Database Diagnostic Monitor (ADOM) report was generated before the execution of the second query. 

D. The database instance was restarted before the execution of the second query. 

Answer:

Q13. Examine the parameters for your database instance: 

NAMETYPE VALUE 

undo_management string AUTO 

undo_retentioninteger 12 00 

undo_tablespace string UNDOTBS1 

You execute the following command: 

SQL> ALTER TABLESPACE undotbs1 RETENTION NOGUARANTEE; 

Which statement is true in this scenario? 

A. Undo data is written to flashback logs after 1200 seconds. 

B. Inactive undo data is retained for 1200 seconds even if subsequent transactions fail due to lack of space in the undo tablespace. 

C. You can perform a Flashback Database operation only within the duration of 1200 seconds. 

D. An attempt is made to keep inactive undo for 1200 seconds but transactions may overwrite the undo before that time has elapsed. 

Answer:

Q14. Which two statements are true about standard database auditing? (Choose two.) 

A. DDL statements can be audited. 

B. Statements that refer to standalone procedure can be audited. 

C. Operations by the users logged on as SYSDBA cannot be audited. 

D. Only one audit record is ever created for a session per audited statement even though it is executed more than once. 

Answer: A,B 

Q15. Identify two situations in which the alert log file is updated. 

A. Running a query on a table returns ORA-600: Internal Error. 

B. Inserting a value into a table returns ORA-01722: invalid number. 

C. Creating a table returns ORA-00955: name us already in used by an existing objects. 

D. Inserting a value into a table returns ORA-00001: unique constraint (SYS.OK_TECHP) violated. 

E. Rebuilding an index using ALTER INDEX . . . REBUILD fails with an ORA-01578: ORACLE data block corrupted (file # 14, block # 50) error. 

Answer: A,E 

Explanation: The alert log is a chronological log of messages and errors, and includes the following items: 

*All internal errors (ORA-600), block corruption errors (ORA-1578), and deadlock errors (ORA-60) that occur 

* Administrative operations, such as CREATE, ALTER, and DROP statements and STARTUP, SHUTDOWN, and ARCHIVELOG statements 

* Messages and errors relating to the functions of shared server and dispatcher processes 

* Errors occurring during the automatic refresh of a materialized view 

* The values of all initialization parameters that had nondefault values at the time the database and instance start 

Note: 

* The alert log file (also referred to as the ALERT.LOG) is a chronological log of messages and errors written out by an Oracle Database. Typical messages found in this file is: database startup, shutdown, log switches, space errors, etc. This file should constantly be monitored to detect unexpected messages and corruptions. 

Q16. Your database supports a DSS workload that involves the execution of complex queries: Currently, the library cache contains the ideal workload for analysis. You want to analyze some of the queries for an application that are cached in the library cache. 

What must you do to receive recommendations about the efficient use of indexes and materialized views to improve query performance? 

A. Create a SQL Tuning Set (STS) that contains the queries cached in the library cache and run the SQL Tuning Advisor (STA) on the workload captured in the STS. 

B. Run the Automatic Workload Repository Monitor (ADDM). 

C. Create an STS that contains the queries cached in the library cache and run the SQL Performance Analyzer (SPA) on the workload captured in the STS. 

D. Create an STS that contains the queries cached in the library cache and run the SQL Access Advisor on the workload captured in the STS. 

Answer:

Explanation: * SQL Access Advisor is primarily responsible for making schema modification recommendations, such as adding or dropping indexes and materialized views. SQL Tuning Advisor makes other types of recommendations, such as creating SQL profiles and restructuring SQL statements. 

* The query optimizer can also help you tune SQL statements. By using SQL Tuning Advisor and SQL Access Advisor, you can invoke the query optimizer in advisory mode to examine a SQL statement or set of statements and determine how to improve their efficiency. SQL Tuning Advisor and SQL Access Advisor can make various recommendations, such as creating SQL profiles, restructuring SQL statements, creating additional indexes or materialized views, and refreshing optimizer statistics. 

Note: 

* Decision support system (DSS) workload 

* The library cache is a shared pool memory structure that stores executable SQL and PL/SQL code. This cache contains the shared SQL and PL/SQL areas and control structures such as locks and library cache handles. 

Reference: Tuning SQL Statements 

START 1Z0-062 EXAM