1Z0-062 Premium Bundle

1Z0-062 Premium Bundle

Oracle Database 12c: Installation and Administration Certification Exam

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

Oracle 1Z0-062 Free Practice Questions

Q1. You execute the following commands to audit database activities: 

SQL > ALTER SYSTEM SET AUDIT_TRIAL=DB, EXTENDED SCOPE=SPFILE; 

SQL > AUDIT SELECT TABLE, INSERT TABLE, DELETE TABLE BY JOHN By SESSION WHENEVER SUCCESSFUL; 

Which statement is true about the audit record that generated when auditing after instance restarts? 

A. One audit record is created for every successful execution of a SELECT, INSERT OR DELETE command on a table, and contains the SQL text for the SQL Statements. 

B. One audit record is created for every successful execution of a SELECT, INSERT OR DELETE command, and contains the execution plan for the SQL statements. 

C. One audit record is created for the whole session if john successfully executes a SELECT, INSERT, or DELETE command, and contains the execution plan for the SQL statements. 

D. One audit record is created for the whole session if JOHN successfully executes a select command, and contains the SQL text and bind variables used. 

E. One audit record is created for the whole session if john successfully executes a SELECT, INSERT, or DELETE command on a table, and contains the execution plan, SQL text, and bind variables used. 

Answer:

Explanation: 

Note: 

* BY SESSION 

In earlier releases, BY SESSION caused the database to write a single record for all SQL statements or operations of the same type executed on the same schema objects in the same session. Beginning with this release (11g) of Oracle Database, both BY SESSION and BY ACCESS cause Oracle Database to write one audit record for each audited statement and operation. 

* BY ACCESS 

Specify BY ACCESS if you want Oracle Database to write one record for each audited statement and operation. 

Note: 

If you specify either a SQL statement shortcut or a system privilege that audits a data definition language (DDL) statement, then the database always audits by access. In all other cases, the database honors the BY SESSION or BY ACCESS specification. 

* For each audited operation, Oracle Database produces an audit record containing this information: / The user performing the operation / The type of operation / The object involved in the operation / The date and time of the operation 

Reference: Oracle Database SQL Language Reference 12c 

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

Answer: B,D,E 

Q3. You created an encrypted tablespace: 

You then closed the encryption wallet because you were advised that this is secure. 

Later in the day, you attempt to create the EMPLOYEES table in the SECURESPACE tablespace with the SALT option on the EMPLOYEE column. 

Which is true about the result? 

A. It creates the table successfully but does not encrypt any inserted data in the EMPNAME column because the wallet must be opened to encrypt columns with SALT. 

B. It generates an error when creating the table because the wallet is closed. 

C. It creates the table successfully, and encrypts any inserted data in the EMPNAME column because the wallet needs to be open only for tablespace creation. 

D. It generates error when creating the table, because the salt option cannot be used with encrypted tablespaces. 

Answer:

Explanation: 

* The environment setup for tablespace encryption is the same as that for transparent data encryption. Before attempting to create an encrypted tablespace, a wallet must be created to hold the encryption key. 

* Setting the tablespace master encryption key is a one-time activity. This creates the master encryption key for tablespace encryption. This key is stored in an external security module (Oracle wallet) and is used to encrypt the tablespace encryption keys. 

* Before you can create an encrypted tablespace, the Oracle wallet containing the tablespace master encryption key must be open. The wallet must also be open before you can access data in an encrypted tablespace. 

* Salt is a way to strengthen the security of encrypted data. It is a random string added to the data before it is encrypted, causing repetition of text in the clear to appear different when encrypted. Salt removes the one common method attackers use to steal data, namely, matching patterns of encrypted text. 

* ALT | NO SALT By default the database appends a random string, called "salt," to the clear text of the column before encrypting it. This default behavior imposes some limitations on encrypted columns: / If you specify SALT during column encryption, then the database does not compress the data in the encrypted column even if you specify table compression for the table. However, the database does compress data in unencrypted columns and encrypted columns without the SALT parameter. 

Q4. You are connected to a pluggable database (PDB) as a common user with DBA privileges. The STATISTICS_LEVEL parameter is PDB_MODIFIABLE. You execute the following: SQL > ALTER SYSTEM SET STATISTICS_LEVEL = ALL SID = ‘*’ SCOPE = SPFILE; Which is true about the result of this command? 

A. The STATISTICS_LEVEL parameter is set to all whenever this PDB is re-opened. 

B. The STATISTICS_LEVEL parameter is set to ALL whenever any PDB is reopened. 

C. The STATISTICS_LEVEL parameter is set to all whenever the multitenant container database (CDB) is restarted. 

D. Nothing happens; because there is no SPFILE for each PDB, the statement is ignored. 

Answer:

Explanation: 

Note: 

* In a container architecture, the parameters for PDB will inherit from the root database. That means if statistics_level=all in the root that will cascade to the PDB databases. 

You can over ride this by using Alter system set, if that parameter is pdb modifiable, there is a new column in v$system_parameter for the same. 

Q5. Which three statements are true about a job chain? 

A. It can contain a nested chain of jobs. 

B. It can be used to implement dependency-based scheduling. 

C. It cannot invoke the same program or nested chain in multiple steps in the chain. 

D. It cannot have more than one dependency. 

E. It can be executed using event-based or time-based schedules. 

Answer: A,B,E 

Reference: http://docs.oracle.com/cd/B28359_01/server.111/b28310/scheduse009.htm#ADMIN12459 

Q6. Which action takes place when a file checkpoint occurs? 

A. The checkpoint position is advanced in the checkpoint queue. 

B. All buffers for a checkpointed file that were modified before a specific SCN are written to disk by DBWn and the SCN is stored in the control file. 

C. The Database Writer process (DBWn) writes all dirty buffers in the buffer cache to data files. 

D. The Log Writer process (LGWR) writes all redo entries in the log buffer to online redo log files. 

Answer:

Q7. Which three factors influence the optimizer's choice of an execution plan? 

A. the optimizer_mode initialization parameter 

B. operating system (OS) statistics 

C. cardinality estimates 

D. object statistics in the data dictionary 

E. fixed baselines 

Answer: A,B 

Reference: http://docs.oracle.com/cd/B19306_01/server.102/b14211/optimops.htm 

Q8. You execute the following PL/SQL: 

Which two statements are true? 

A. Fine-Grained Auditing (FGA) is enabled for the PRICE column in the PRODUCTS table for SELECT statements only when a row with PRICE > 10000 is accessed. 

B. FGA is enabled for the PRODUCTS.PRICE column and an audit record is written whenever a row with PRICE > 10000 is accessed. 

C. FGA is enabled for all DML operations by JIM on the PRODUCTS.PRICE column. 

D. FGA is enabled for the PRICE column of the PRODUCTS table and the SQL statements is captured in the FGA audit trial. 

Answer: A,B 

Explanation: DBMS_FGA.add_policy 

* The DBMS_FGA package provides fine-grained security functions. 

* ADD_POLICY Procedure 

This procedure creates an audit policy using the supplied predicate as the audit condition. 

Incorrect: 

Not C: object_schema 

The schema of the object to be audited. (If NULL, the current log-on user schema is assumed.) 

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

Answer: A,C 

Explanation: A: PGA itself is subdivided. The UGA (User Global Area) contains session state information, including stuff like package-level variables, cursor state, etc. Note that, with shared server, the UGA is in the SGA. It has to be, because shared server means that the session state needs to be accessible to all server processes, as any one of them could be assigned a particular session. However, with dedicated server (which likely what you're using), the UGA is allocated in the PGA. 

C: The Location of a private SQL area depends on the type of connection established for a session. If a session is connected through a dedicated server, private SQL areas are located in the server process’ PGA. However, if a session is connected through a shared server, part of the private SQL area is kept in the SGA. 

Note: 

* System global area (SGA) The SGA is a group of shared memory structures, known as SGA components, that contain data and control information for one Oracle Database instance. The SGA is shared by all server and background processes. Examples of data stored in the SGA include cached data blocks and shared SQL areas. 

* Program global area (PGA) 

A PGA is a memory region that contains data and control information for a server process. It is nonshared memory created by Oracle Database when a server process is started. Access to the PGA is exclusive to the server process. There is one PGA for each server process. Background processes also allocate their own PGAs. The total memory used by all individual PGAs is known as the total instance PGA memory, and the collection of individual PGAs is referred to as the total instance PGA, or just instance PGA. You use database initialization parameters to set the size of the instance PGA, not individual PGAs. 

Reference: Oracle Database Concepts 12c 

Q10. Which two statements are true concerning the Resource Manager plans for individual pluggable databases (PDB plans) in a multitenant container database (CDB)? 

A. If no PDB plan is enabled for a pluggable database, then all sessions for that PDB are treated to an equal degree of the resource share of that PDB. 

B. In a PDB plan, subplans may be used with up to eight consumer groups. 

C. If a PDB plan is enabled for a pluggable database, then resources are allocated to consumer groups across all PDBs in the CDB. 

D. If no PDB plan is enabled for a pluggable database, then the PDB share in the CDB plan is dynamically calculated. 

E. If a PDB plan is enabled for a pluggable database, then resources are allocated to consumer groups based on the shares provided to the PDB in the CDB plan and the shares provided to the consumer groups in the PDB plan. 

Answer: A,E 

Explanation: A: Setting a PDB resource plan is optional. If not specified, all sessions 

within the PDB are treated equally. 

* In a non-CDB database, workloads within a database are managed with resource plans. 

In a PDB, workloads are also managed with resource plans, also called PDB resource plans. The functionality is similar except for the following differences: / Non-CDB Database Multi-level resource plans Up to 32 consumer groups Subplans / PDB Database Single-level resource plans only Up to 8 consumer groups (not B) No subplans 

Q11. Which three statements are true when the listener handles connection requests to an Oracle 12c database instance with multithreaded architecture enabled In UNIX? 

A. Thread creation must be routed through a dispatcher process 

B. The local listener may spawn a now process and have that new process create a thread 

C. Each Oracle process runs an SCMN thread. 

D. Each multithreaded Oracle process has an SCMN thread. 

E. The local listener may pass the request to an existing process which in turn will create a thread. 

Answer: A,D,E 

Q12. Examine the following command: 

CREATE TABLE (prod_id number(4), Prod_name varchar2 (20), 

Category_id number(30), 

Quantity_on_hand number (3) INVISIBLE); 

Which three statements are true about using an invisible column in the PRODUCTS table? 

A. The %ROWTYPE attribute declarations in PL/SQL to access a row will not display the invisible column in the output. 

B. The DESCRIBE commands in SQL *Plus will not display the invisible column in the output. 

C. Referential integrity constraint cannot be set on the invisible column. 

D. The invisible column cannot be made visible and can only be marked as unused. 

E. A primary key constraint can be added on the invisible column. 

Answer: A,B,E 

Explanation: AB: You can make individual table columns invisible. Any generic access of a table does not show the invisible columns in the table. For example, the following operations do not display invisible columns in the output: 

* SELECT * FROM statements in SQL 

* DESCRIBE commands in SQL*Plus 

* %ROWTYPE attribute declarations in PL/SQL 

* Describes in Oracle Call Interface (OCI) 

Incorrect: 

Not D: You can make invisible columns visible. 

You can make a column invisible during table creation or when you add a column to a table, and you can later alter the table to make the same column visible. 

Reference: Understand Invisible Columns 

Q13. Examine these two statements: 

Which three are true about the MRKT tablespace? 

A. The MRKT tablespace is created as a small file tablespace, because the file size is less than the minimum required for big file files. 

B. The MRKT tablespace may be dropped if it has no contents. 

C. Users who were using the old default tablespace will have their default tablespaces changed to the MRKT tablespace. 

D. No more data files can be added to the tablespace. 

E. The relative file number of the tablespace is not stored in rowids for the table rows that are stored in the MRKT tablespace. 

Answer: B,C,D 

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

Answer:

Explanation: RMAN> ALTER TABLESPACE sysaux OFFLINE IMMEDIATE; RMAN> RESTORE TABLESPACE sysaux; RMAN> RECOVER TABLESPACE sysaux; RMAN> ALTER TABLESPACE sysaux ONLINE; 

* Example: 

While evaluating the 12c beta3 I was not able to do the recover while testing “all pdb files lost”. 

Cannot close the pdb as the system datafile was missing… 

So only option to recover was: 

Shutdown cdb (10) 

startup mount; (1) 

restore pluggable database 

recover pluggable database 

alter database open; 

alter pluggable database name open; 

Oracle support says: You should be able to close the pdb and restore/recover the system tablespace of PDB. 

* Inconsistent backups are usually created by taking online database backups. You can also make an inconsistent backup by backing up data files while a database is closed, either: 

/ Immediately after the crash of an Oracle instance (or, in an Oracle RAC configuration, all instances) / After shutting down the database using SHUTDOWN ABORT 

Inconsistent backups are only useful if the database is in ARCHIVELOG mode and all archived redo logs created since the backup are available. 

* Open the database with the RESETLOGS option after finishing recovery: SQL> ALTER DATABASE OPEN RESETLOGS; 

Q15. A senior DBA asked you to execute the following command to improve performance: 

SQL> ALTER TABLE subscribe log STORAGE (BUFFER_POOL recycle); 

You checked the data in the SUBSCRIBE_LOG table and found that it is a large table 

containing one million rows. 

What could be a reason for this recommendation? 

A. The keep pool is not configured. 

B. Automatic Workarea Management is not configured. 

C. Automatic Shared Memory Management is not enabled. 

D. The data blocks in the SUBSCRIBE_LOG table are rarely accessed. 

E. All the queries on the SUBSCRIBE_LOG table are rewritten to a materialized view. 

Answer:

Explanation: The most of the rows in SUBSCRIBE_LOG table are accessed once a week. 

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