Free Oracle 1Z0-062 Exam Questions (page: 16)

You wish to enable an audit policy for all database users, except SYS, SYSTEM, and SCOTT.
You issue the following statements:
SQL> AUDIT POLICY ORA_DATABASE_PARAMETER EXCEPT SYS;
SQL> AUDIT POLICY ORA_DATABASE_PARAMETER EXCEPT SYSTEM;
SQL> AUDIT POLICY ORA_DATABASE_PARAMETER EXCEPT SCOTT;
For which database users is the audit policy now active?

  1. All users except SYS
  2. All users except SCOTT
  3. All users except sys and SCOTT
  4. All users except sys, system, and SCOTT

Answer(s): B

Explanation:

If you run multiple AUDIT statements on the same unified audit policy but specify different EXCEPT users, then Oracle Database uses the last exception user list, not any of the users from the preceding lists. This means the effect of the earlier AUDIT POLICY ... EXCEPT statements are overridden by the latest AUDIT POLICY ... EXCEPT statement.
Note:
* The ORA_DATABASE_PARAMETER policy audits commonly used Oracle Database parameter settings. By default, this policy is not enabled.
* You can use the keyword ALL to audit all actions. The following example shows how to audit all actions on the HR.EMPLOYEES table, except actions by user pmulligan.
Example Auditing All Actions on a Table
CREATE AUDIT POLICY all_actions_on_hr_emp_pol
ACTIONS ALL ON HR.EMPLOYEES;
AUDIT POLICY all_actions_on_hr_emp_pol EXCEPT pmulligan;



The HR user receives the following error while inserting data into the sales table:

On investigation, you find that the users tablespace uses Automatic 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? (Choose two.)

  1. Altering the data file associated with the USERS tablespace to extend automatically
  2. Adding a data file to the USERS tablespace
  3. Changing segment space management for the USERS tablespace to manual
  4. Creating a new tablespace with autoextend enabled and changing the default tablespace of the HR user to the new tablespace
  5. Enabling resumable space allocation by setting the RESUMABLE_TIMEOUT parameter to a nonzero value

Answer(s): A,B



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? (Choose three.)

  1. Statistics collection is not done for the CUSTOMERS table when schema stats are gathered.
  2. Statistics collection is not done for the CUSTOMERS table when database stats are gathered.
  3. Any existing statistics for the CUSTOMERS table are still available to the optimizer at parse time.
  4. Statistics gathered on the CUSTOMERS table when schema stats are gathered are stored as pending statistics.
  5. Statistics gathered on the CUSTOMERS table when database stats are gathered are stored as pending statistics.

Answer(s): C,D,E

Explanation:

* SET_TABLE_PREFS Procedure
This procedure is used to set the statistics pReference: 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.



You conned using SQL Plus to the root container of a multitenant container database (CDB) with SYSDBA privilege.
The CDB has several pluggable databases (PDBs) open in the read/write mode.
There are ongoing transactions in both the CDB and PDBs.
What happens alter issuing the SHUTDOWN TRANSACTIONAL statement?

  1. The shutdown proceeds immediately. The shutdown proceeds as soon as all transactions in the PDBs are either committed or rolled hack.
  2. The shutdown proceeds as soon as all transactions in the CDB are either committed or rolled back.
  3. The shutdown proceeds as soon as all transactions in both the CDB and PDBs are either committed or rolled back.
  4. The statement results in an error because there are open PDBs.

Answer(s): B

Explanation:

* SHUTDOWN [ABORT | IMMEDIATE | NORMAL | TRANSACTIONAL [LOCAL]] Shuts down a currently running Oracle Database instance, optionally closing and dismounting a database. If the current database is a pluggable database, only the pluggable database is closed. The consolidated instance continues to run. Shutdown commands that wait for current calls to complete or users to disconnect such as SHUTDOWN NORMAL and SHUTDOWN TRANSACTIONAL have a time limit that the SHUTDOWN command will wait. If all events blocking the shutdown have not occurred within the time limit, the shutdown command cancels with the following message:
ORA-01013: user requested cancel of current operation
* If logged into a CDB, shutdown closes the CDB instance. To shutdown a CDB or non CDB, you must be connected to the CDB or non CDB instance that you want to close, and then enter
SHUTDOWN
Database closed.
Database dismounted.
Oracle instance shut down.
To shutdown a PDB, you must log into the PDB to issue the SHUTDOWN command.
SHUTDOWN
Pluggable Database closed.
Note:
* Prerequisites for PDB Shutdown
When the current container is a pluggable database (PDB), the SHUTDOWN command can only be used if:
The current user has SYSDBA, SYSOPER, SYSBACKUP, or SYSDG system privilege. The privilege is either commonly granted or locally granted in the PDB. The current user exercises the privilege using AS SYSDBA, AS SYSOPER, AS SYSBACKUP, or AS SYSDG at connect time.
To close a PDB, the PDB must be open.



Viewing page 16 of 87



Post your Comments and Discuss Oracle 1Z0-062 exam prep with other Community members:

1Z0-062 Exam Discussions & Posts