1Z0-062 Premium Bundle

1Z0-062 Premium Bundle

Oracle Database 12c: Installation and Administration Certification Exam

4.5 
(23835 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
December 4, 2024Last update

Oracle 1Z0-062 Free Practice Questions

Q1. 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 backed-up 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 backed-up 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. 

Answer: A,C,F 

Explanation: AC (not E): 

The md_restore command allows you to restore a disk group from the metadata created by 

the md_backup command. 

md_restore can’t restore data, only metadata. 

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

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

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

Q5. In your database, you want to ensure that idle sessions that are blocking active are automatically terminated after a specified period of time. 

How would you accomplish this? 

A. Setting a metric threshold 

B. Implementing Database Resource Manager 

C. Enabling resumable timeout for user sessions 

D. Decreasing the value of the IDLE_TIME resource limit in the default profile 

Answer:

Explanation: An Oracle session is sniped when you set the idle_time parameter to disconnect inactive sessions. (It's only like sniping on ebay in that a time is set for an action to occur.) 

Oracle has several ways to disconnect inactive or idle sessions, both from within SQL*Plus via resources profiles (connect_time, idle_time), and with the SQL*net expire time parameter. Here are two ways to disconnect an idle session: 

Set the idle_time parameter in the user profile Set the sqlnet.ora parameter expire_time 

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

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. 

Q7. The hr user receiver, the following error while inserting data into the sales table: 

ERROR at line 1: 

ORA-01653; unable to extend table HR.SALES by 128 in tablespace USERS 

On investigation, you find that the users tablespace uses Automnrif Segment Space Management (ASSM). It is the default tablespace for the HR user with an unlimited quota on it. 

Which two methods would you use to resolve this error? 

A. Altering the data life associated with the USERS tablespace to ex automatically 

B. Adding a data life to the USERS tablespace 

C. Changing segment space management for the USERS tablespace to manual 

D. Creating a new tablespace with autoextend enabled and changing the default tablespace of the HR user to the new tablespace 

E. Enabling resumable space allocation by setting the RESUMABLE_TIMEOUT parameter to a nonzero value 

Answer: A,D 

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

Q9. A user establishes a connection to a database instance by using an Oracle Net connection. You want to ensure the following: 

1. The user account must be locked after five unsuccessful login attempts. 

2. Data read per session must be limited for the user. 

3- The user cannot have more than three simultaneous sessions. 

4. The user must have a maximum of 10 minutes session idle time before being logged off automatically. 

How would you accomplish this? 

A. by granting a secure application role to the user 

B. by implementing Database Resource Manager 

C. by using Oracle Label Security options 

D. by assigning a profile to the user 

Answer:

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

Answer: A,B,D 

Explanation: In this case we have run the impdp without performing any conversion if 

endian format is different then we have to first perform conversion. 

Q11. What is the result of executing a TRUNCATE TABLE command on a table that has Flashback Archiving enabled? 

A. It fails with the ORA-665610 Invalid DDL statement on history-tracked message 

B. The rows in the table are truncated without being archived. 

C. The rows in the table are archived, and then truncated. 

D. The rows in both the table and the archive are truncated. 

Answer:

Explanation: You cannot roll back a TRUNCATE TABLE statement, nor can you use a FLASHBACK TABLE statement to retrieve the contents of a table that has been truncated. 

Q12. Examine this command: 

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. 

Answer: C,D,E 

Explanation: * SET_TABLE_PREFS Procedure 

This procedure is used to set the statistics preferences of the specified table in the specified schema. 

* Example: Using Pending Statistics Assume many modifications have been made to the employees table since the last time statistics were gathered. To ensure that the cost-based optimizer is still picking the best plan, statistics should be gathered once again; however, the user is concerned that new statistics will cause the optimizer to choose bad plans when the current ones are acceptable. The user can do the following: 

EXEC DBMS_STATS.SET_TABLE_PREFS('hr', 'employees', 'PUBLISH', 'false'); 

By setting the employees tables publish preference to FALSE, any statistics gather from now on will not be automatically published. The newly gathered statistics will be marked as pending. 

Q13. Your database is open and the LISTENER listener running. You stopped the wrong listener LISTENER by issuing the following command: 

1snrctl > STOP 

What happens to the sessions that are presently connected to the database Instance? 

A. They are able to perform only queries. 

B. They are not affected and continue to function normally. 

C. They are terminated and the active transactions are rolled back. 

D. They are not allowed to perform any operations until the listener LISTENER is started. 

Answer:

Explanation: The listener is used when the connection is established. The immediate impact of stopping the listener will be that no new session can be established from a remote host. Existing sessions are not compromised. 

Q14. You are administering a database and you receive a requirement to apply the following restrictions: 

1. A connection must be terminated after four unsuccessful login attempts by user. 

2. A user should not be able to create more than four simultaneous sessions. 

3. User session must be terminated after 15 minutes of inactivity. 

4. Users must be prompted to change their passwords every 15 days. 

How would you accomplish these requirements? 

A. by granting a secure application role to the users 

B. by creating and assigning a profile to the users and setting the REMOTE_OS_AUTHENT parameter to FALSE 

C. By creating and assigning a profile to the users and setting the SEC_MAX_FAILED_LOGIN_ATTEMPTS parameter to 4 

D. By Implementing Fine-Grained Auditing (FGA) and setting the REMOTE_LOGIN_PASSWORD_FILE parameter to NONE. 

E. By implementing the database resource Manager plan and setting the SEC_MAX_FAILED_LOGIN_ATTEMPTS parameters to 4. 

Answer:

Explanation: You can design your applications to automatically grant a role to the user who is trying to log in, provided the user meets criteria that you specify. To do so, you create a secure application role, which is a role that is associated with a PL/SQL procedure (or PL/SQL package that contains multiple procedures). The procedure validates the user: if the user fails the validation, then the user cannot log in. If the user passes the validation, then the procedure grants the user a role so that he or she can use the application. The user has this role only as long as he or she is logged in to the application. When the user logs out, the role is revoked. 

Incorrect: 

Not B: REMOTE_OS_AUTHENT specifies whether remote clients will be authenticated with the value of the OS_AUTHENT_PREFIX parameter. 

Not C, not E: SEC_MAX_FAILED_LOGIN_ATTEMPTS specifies the number of authentication attempts that can be made by a client on a connection to the server process. 

After the specified number of failure attempts, the connection will be automatically dropped by the server process. 

Not D: REMOTE_LOGIN_PASSWORDFILE specifies whether Oracle checks for a password file. 

Values: 

shared 

One or more databases can use the password file. The password file can contain SYS as well as non-SYS users. 

exclusive 

The password file can be used by only one database. The password file can contain SYS as well as non-SYS users. 

none 

Oracle ignores any password file. Therefore, privileged users must be authenticated by the operating system. 

Note: 

The REMOTE_OS_AUTHENT parameter is deprecated. It is retained for backward compatibility only. 

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

Answer: A,D 

Explanation: A (not B,not E): 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. 

D: You can create a PDB by plugging in a Non-CDB as a PDB. The following graphic depicts the options for creating a PDB: 

Description of cncpt358.png follows 

Incorrect: 

Not E: For the duration of its existence, a database is either a CDB or a non-CDB. You cannot transform a non-CDB into a CDB or vice versa. You must define a database as a CDB at creation, and then create PDBs within this CDB. 

Q16. You execute the following piece of code with appropriate privileges: 

User SCOTT has been granted the CREATE SESSION privilege and the MGR role. 

Which two statements are true when a session logged in as SCOTT queries the SAL column in the view and the table? 

A. Data is redacted for the EMP.SAL column only if the SCOTT session does not have the MGR role set. 

B. Data is redacted for EMP.SAL column only if the SCOTT session has the MGR role set. 

C. Data is never redacted for the EMP_V.SAL column. 

D. Data is redacted for the EMP_V.SAL column only if the SCOTT session has the MGR role set. 

E. Data is redacted for the EMP_V.SAL column only if the SCOTT session does not have the MGR role set. 

Answer: A,C 

Explanation: 

Note: 

* DBMS_REDACT.FULL completely redacts the column data. 

* DBMS_REDACT.NONE applies no redaction on the column data. Use this function for development testing purposes. LOB columns are not supported. 

* The DBMS_REDACT package provides an interface to Oracle Data Redaction, which enables you to mask (redact) data that is returned from queries issued by low-privileged users or an application. 

* If you create a view chain (that is, a view based on another view), then the Data Redaction policy also applies throughout this view chain. The policies remain in effect all of the way up through this view chain, but if another policy is created for one of these views, then for the columns affected in the subsequent views, this new policy takes precedence. 

START 1Z0-062 EXAM