1Z0-063 Exam - Oracle Database 12c: Advanced Administration

certleader.com

Q1. In your multitenant container database (CDB) that contains pluggable databases (PDBs), the hr user executes the following commands to create and grant privileges on a procedure: 

CREATEORREPLACEPROCEDUREcreate_test_v(v_emp_idNUMBER,v_enameVARCHA 

R2,v_SALARYNUMBER,v_dept_idNUMBER) 

BEGIN 

INSERT INTO hr.test VALUES (v_emp_id, v_ename, v salary, v_dept_id); 

END; 

GRANT EXECUTE ON CREATE_TEST TO John, jim, smith, king; 

How can you prevent users having the execute privilege on the create_test_v procedure frominserting values into tables on which they do not have any privileges? 

A. Create the create_test procedure with definer's rights. 

B. Grant the execute privilege to users with grant option on the create_test procedure. 

C. Create the create_test procedure with invoker's rights. 

D. Create the create_test procedure as part of a package and grant users the execute privilege on the package. 

Answer:

Q2. Your database is running in archivelog mode. You are taking a backup of your database by using RMAN with a recovery catalog. Because of a media failure, one of the data files and all the control files are lost. 

Examine the steps to recover the database: 

1.Restore the control filesby using the RMAN restore controlfile command. 

2.Mount the database. 

3.Restore the data files by using the RMAN restore database command. 

4.Open the database with the resetlogs option. 

5.Recover the data files by using the RMAN recover using backup controlfile command. 

6. 

Start the database instance in nomount state. 

7. 

Connect to the target database by using a recovery catalog. 

8.Open the database. 

9.Restore the data file. 

10.Recover the data file. 

Identify the required steps in the correct order. 

A. 7,6, 1, 2, 3, 5, 4 

B. 7, 2, 1, 3, 5, 8 

C. 7, 6, 1, 2, 9, 10, 8 

D. 7, 6, 1, 2, 9, 10, 4 

Answer:

140. You want RMAN to make duplicate copies of data files when using the backup command. 

What must you set using the RMAN configure command to achieve this? 

A. MAXSETSIZE TO 2; 

B. DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET; 

C. CHANNEL DEVICE TYPE DISK FORMAT '/disk1/%U' , '/disk2/%U' 

D. DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2; 

Q3. Examine the command: 

$expdp SYSTEM FULL=YES DUMPFILE=dpump_dir1:fulll%U.dmp, dpump_dir2:full2% U.dmp, dpump_dir3:full3%U.djnp FILESIZE=400M PARALLEL=3 JOB_NAME=expfull 

Which statement is true about the execution of the command? 

A. It fails because the log file parameter is not specified. 

B. It fails because no absolutepath is specified for the log file and dump file. 

C. It succeeds and exports the full database, simultaneously creating three copies of dump files at three different locations. 

D. It succeeds and exports the full database, simultaneously creating three dump files at three different locations, but the total number of dump files can exceed three. 

Answer:

Q4. Examine the commands executed to monitor database operations: $> conn sys/oracle@prod as sysdba 

SQL> VAR eid NUMBER 

SQL>EXEC :eid := DBMS_SQL_MONITOR.BEGlN_OPERATION('batch_job’,FORCED_TRACKING=>'Y'); 

Which two statements are true? 

A. Database operations will be monitored only when they consume a significant amount of resource. 

B. Database operations for all sessions will be monitored. 

C. Database operations will be monitored only if the STATISTICS_LEVEL parameter is set to TYPICAL and CONTROL_MANAGEMENT_PACK_ACCESS is set DIAGNISTIC + TUNING. 

D. Only DML and DDL statements will be monitored for the session. 

E. All subsequent statements in the session will be treated as one database operation and will be monitored. 

Answer: C,E 

Explanation: C: Setting the CONTROL_MANAGEMENT_PACK_ACCESS initialization parameter to DIAGNOSTIC+TUNING (default) enables monitoring of database operations. Real-Time SQL Monitoring is a feature of the Oracle Database Tuning Pack. 

Note: 

* The DBMS_SQL_MONITOR package provides information about Real-time SQL 

Monitoring and Real-time Database Operation Monitoring. 

*(not B) BEGIN_OPERATION Function starts a composite database operation in the 

current session. 

/ (E) FORCE_TRACKING - forces the composite database operation to be tracked when the operation starts. You can also use the string variable 'Y'. 

/ (not A) NO_FORCE_TRACKING - the operation will be tracked only when it has consumed at least 5 seconds of CPU or I/O time. You can also use the string variable 'N'. 

Q5. You execute the commands on a multitenant container database CDB1 that has multiple pluggable databases: 

$ . oraenv ORACLE-_SID = [oracle] ? cdb1 The oraclebasefor ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 is 

/u01/app/oracle $ rman target / Recovery Manager : Release 12.1.0.0.2 - production on Fri Ju1 19 05:18:33: 2013 

Coppyright (c) 1982, 2013, oracle and/or its affiliates. All rights reserved. 

Connected to target database:CDB1 (DBID=782249327) 

RMAN>SELECT name FROMv$tablespace; 

Which statement is true about the execution of the last command? 

A. It succeeds and displays all the tablespaces that belong to the root database. 

B. It fails and returns an error because a connection is not made by using the sysdba privilege. 

C. It succeeds and displays all the tablespaces that belong to the root and pluggable databases. 

D. It fails and returns an error because SQL commands cannot be executed at the RMAN prompt. 

Answer:

Q6. The CATDB12C database contains an Oracle Database 12c catalog schema owned by the rci2c user. 

The CATD3H database contains an Oracle Database Ug catalog schema owned by the rch user. 

A database with dbid=H2324I is registered in the catdbII catalog. Both the recovery catalog databases are open. 

In the CATD3i2c database, you execute the commands: 

: r-ar. 

RKAN> CONNECT CATALOG rci2c/passI2c@catdbi2c 

RKAN> IMPORT CATALOG rcii/pwdcatUQcatdfoil DBI2=142324i; 

What is the outcome of the import? 

A. It fails because the target database and recovery catalog database are of different versions. 

B. It succeeds and all global scripts in the rci: catalog that have the same name as existing global scripts in the RCI2C catalog are automatically renamed. 

C. It succeeds but the database is not automatically registered in the rc:2c catalog. 

D. It fails because RMAN is not connected to the target database with r3:T=:42324:. 

Answer:

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 SELECTDBMS_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.reportwcol_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 Atthis 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 informationand 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 analyzedthe 

distribution of values within a column, he does not collect value-based relationships 

between columns. 

Creating extended statistics 

Here 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. 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? 

A. all users exceptsys 

B. all users except scott 

C. all users except sys and scott 

D. all users except sys, system, and scott 

Answer:

Q9. Examine the RMAN command: 

RMAN> CONFIGURE ENCRYPTION FOR DATABASE ON; 

RMAN> BACKUP DATABASE PLUS ARCHIVELOG; 

Which prerequisitemust be met before accomplishing the backup? 

A. The password for the encryption must be set up. 

B. Oracle wallet for the encryption must be set up. 

C. All the tablespaces in the database must be encrypted. 

D. Oracle Database Vault must be enabled. 

Answer:

Reference:configuration encryption will use by Transparent encryption, For transparent encryption, you will need to create a wallet, and it must be open. 

Transparent encryption will then occur automatically after you have issued the CONFIGURE ENCRYPTION FOR DATABASE ON or CONFIGURE ENCRYPTION FOR TABLESPACE ON command. 

http://docs.oracle.com/cd/E25054_01/backup.1111/e10642/rcmbckad.htm#CEGEJABH 

QUESTIONNO: 15 

A database is running in archivelog mode. The database contains locally managed tablespaces. Examine the RMAN command: 

RMAN> BACKUP 

AS COMPRESSED BACKUPSET 

SECTION SIZE 1024M 

DATABASE; 

Which statement is true about the execution of the command? 

A.The backup succeeds only if all the tablespaces are locally managed. 

B.The backup succeeds only if the RMAN default device for backup is set to disk. 

C.The backup fails because you cannot specify section size for a compressed backup. 

D.The backup succeeds and only the used blocks are backed up with a maximum backup 

piece size of 1024 MB. 

Q10. While performing database backupto tape via the media manager interface, you notice that tape streaming is not happening because RMAN is not sending data blocks fast enough to the tape drive. 

Which two actions would you take for tape streaming to happen during the backup? 

A. Configure backup optimization. 

B. Configure the channel to increase maxopenfiles. 

C. Configure a backup policy by using incremental backups. 

D. Configure the channel to increase capacity with the rate parameter. 

E. Configure the channel to adjust the tape buffer size byusing the 3LKSIZE option. 

F. Configure large_pool, if not done already. Alternatively, you can increase the size of 

G. LARGE_POOL. 

Answer: A,D