You are on page 1of 11

2012

Atelier QCM ORACLE DBAII

daissaoui 09/01/2012
Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

MODULE 1
1. Which tool or tools can be used as interfaces to the Recovery Manager? (Choose all that apply.) A. B. C. D. E. Database Control The DBMS_PIPE package iSQL*Plus The RMAN executable SQL*Plus

2. Why will this command block fail? (Choose the best answer.) run { connect target sys/oracle@ocp10g; backup database including current controlfile;} A. A connection as SYS must be as SYSDBA. B. Specifying INCLUDE CURRENT CONTROLFILE cannot be done when the whole database has already been specified. C. CONNECT cannot appear in a command block. D. There is no ALLOCATE CHANNEL command. 3. Some attributes of a backup apply only to backup sets, only to image copies, or to both. Mark the following attributes as being applicable to backup sets only; image copies only; or both. A. B. C. D. E. F. Can be updated from incremental backups. Can be incremental backups. Can be written to tape. Can be made without requiring tablespace hot backup mode. Can include all blocks of a datafile. Can be of the controlfile.

4. You issue the RMAN command, BACKUP AS BACKUPSET DATAFILE 1 PLUS ARCHIVELOG; What will happen if there is a log switch during the backup? (Choose the best answer.) A. B. C. D. The filled logfile group will not be archived until the backup has completed. The filled logfile group will be archived but not included in the backup. The filled logfile group will be archived and included in the backup. The syntax is wrong: archive logs must be backed up into their own backup set.

5. Which of the following statements, if any, are correct about RMAN offline backups? (Choose all correct answers.) A. B. C. D. E. F. The database must be in NOMOUNT mode. The database must be in MOUNT mode. The backup will fail if the shutdown mode was SHUTDOWN IMMEDIATE. NOARCHIVELOG databases can only be backed up offline. ARCHIVELOG databases cannot be backed up offline. Offline backups can be incremental.

6. You are running this command block daily: run { allocate channel t1 type sbt; backup as backupset archivelog all delete input;} and you notice that some archive logs remain on disk. What could be the cause of this? (Choose the best answer.)

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

A. B. C. D.

Tape channels cannot write to disks, and they therefore cannot delete from them. You need two channels, one to copy and one to delete. There are multiple archive log destinations. The retention policy does not permit immediate deletion.

7. You perform a full backup on Sunday, an incremental level 0 backup on Monday, an incremental level 1 differential backup on Tuesday, an incremental level 1 cumulative backup on Wednesday, and an incremental level 1 cumulative backup on Thursday. Which blocks will be included in the Thursday backup? (Choose the best answer.) A. B. C. D. All blocks changed since Sunday All blocks changed since Monday All blocks changed since Tuesday All blocks changed since Wednesday

8. When you enable block change tracking, which process is responsible for recording blocks that have been changed? (Choose the best answer.) A. B. C. D. Database writer Log writer The server process making the change A new background process

9. Which of the following commands will tell you about backup sets that are no longer needed according to your retention policy? (Choose the best answer.) A. B. C. D. E. LIST EXPIRED BACKUPSET; LIST OBSOLETE BACKUPSET; REPORT EXPIRED BACKUPSET; REPORT OBSOLETE; None of the above

10. Which of the following is correct about the REPORT SCHEMA command? (Choose the best answer). A. B. C. D. It will list the schema objects in the database. It will list the datafiles of the database. It will list the datafiles and controlfile of the database. It will list the schema objects and the datafiles.

11. You issue this command: BACKUP AS COPY DATABASE PLUS ARCHIVELOG DELETE INPUT; What will happen? (Choose the best answer.) A. There will be an error, because DELETE INPUT is not valid for a backup of anything other than archive logs. B. The backup will succeed, and the database and archive logs will be deleted. C. The backup will succeed, and all the archive logs will be deleted. D. The backup will succeed, and only the archive logs in the primary destination will be deleted. 12. You have issued the command configure device type disk parallelism 3; and then execute this job: run { allocate channel t1 type disk; allocate channel t2 type disk; backup format '/backup/%U' datafile 1,2,3,4,5;} What degree of parallelism will you get? (Choose the best answer.)

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

A. Three parallel streams, because the configured default is greater than the number of channels requested B. Two parallel streams, because only two channels will be launched C. One stream only, because there is only one format specifier for the output file D. Five parallel streams, because there are five files nominated and a total of five channels: three configured default channels, and two manually allocated 13. A number of V$ views can be queried to report on RMAN backups. Where is the information for these views stored? A. B. C. D. In the target database controlfile only In the target database controlfile only, unless there is a Recovery Catalog In the Recovery Catalog controlfile only, if you are using a Recovery Catalog In the Recovery Catalog controlfile and the target database controlfile, if you are using a Recovery Catalog

MODULE 2
1. Which of the following file types are not restored when doing an incomplete recovery? (Choose all that apply.) A. B. C. D. E. F. Controlfile Datafiles for permanent tablespaces Datafiles for undo tablespaces Online redo log files Server parameter file Tempfiles for temporary tablespaces

2. It is now 15:00, on Tuesday. A bad transaction was committed in your database at about 14:30. Investigation shows that the tables and indexes affected were on just two tablespaces: the rest of the database is fine. The two tablespaces and several others were backed up last night, but some tablespaces are backed up only on the weekend. Your database is in archivelog mode, with log switches about every ten minutes. Which of the following statements is correct? (Choose the best answer.) A. You can do an incomplete restore and recovery to 14:29, of just the two tablespaces. The loss of data will be about 30 minutes of work in those tablespaces. B. You must restore the whole database from the weekend backup and recover to 14:29. You will lose about 30 minutes of work. C. You must restore the whole database and do an incomplete recovery canceling the application of the archive log that was active at 14:30. You will lose about ten minutes of work. D. You can restore some tablespaces from last night, the others from the weekend, and recover to 14:29. You will lose about 30 minutes of work. 3. You are doing a point-in-time recovery with SQL*Plus. What format should you use for the date/time in your RECOVER DATABASE UNTIL... statement? (Choose the best answer.) A. yyyy-mm-dd:hh24:mi:ss B. mm-dd-yyyy:hh24:mi:ss

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

C. It will depend on your NLS_DATE_FORMAT setting D. It will depend on your NLS_TERRITORY setting 4. Under which of the following circumstances is an incomplete recovery necessary? (Choose two answers.) A. You lose all copies of your current online log file group. B. You lose a critical tablespace: SYSTEM, and/or the currently active UNDO tablespace. C. A user makes a bad transaction, and the instance crashes before he can issue the ROLLBACK statement. D. A datafile is created, used, and destroyed before it gets backed up. E. You back up a tablespace, drop it, and then want to get to the objects that were in it. F. 5. Which of the following are valid syntax for the UNTIL clause of the RECOVER DATABASE command when it is issued from SQL*Plus? (Choose three answers.) A. ...UNTIL CANCEL; B. ...UNTIL CHANGE <system change number>; C. ...UNTIL SCN <system change number>; D. ...UNTIL SEQUENCE <sequence number>; E. ...UNTIL TIME <time>; F. ...UNTIL XID <transaction number>; 6. To do an incomplete recovery, what open mode must the database be in? (Choose the best answer.) A. B. C. D. E. Incomplete recovery can be done only with the database CLOSED. Incomplete recovery can be done only in NOMOUNT mode. Incomplete recovery can be done only in MOUNT mode. Incomplete recovery can be in OPEN mode, if the database is in archivelog mode. SQL*Plus can do incomplete recovery only in CLOSED mode; RMAN can do it in any mode.

7. Which of these RMAN RECOVER commands will apply all redo for a nonclustered database up to and including that in log switch number 90? (Choose the best answer.) A. B. C. D. RECOVER DATABASE UNTIL SEQUENCE 90; RECOVER DATABASE UNTIL SEQUENCE 91; RECOVER DATABASE UNTIL SEQUENCE 90 THREAD 1; RECOVER DATABASE UNTIL SEQUENCE 91 THREAD 1;

8. You lose your controlfile while the database is open, and it is not multiplexed. What should you do? (Choose the best answer.) A. Restore the datafiles and controlfile, and perform an incomplete recovery. You will not lose any data. B. Restore the datafiles and controlfile, and perform a complete recovery. You will not lose any data. C. Re-create the controlfile. You will not lose any data. D. You can restore the controlfile or re-create it, but you must do an incomplete recovery because losing all copies of the controlfile will mean losing data. 9. Examine the following RMAN script carefully. Which line will result in an error? (Choose the best answer.) A. run { B. sql "alter session set nls_date_format=''dd-mm-yyyy hh24:mi:ss''";

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

C. restore database; D. recover database until time '10-12-2004 15:30:00'; E. alter database open resetlogs;} 10. Which users can perform an incomplete recovery? (Choose the best answer.) A. B. C. D. E. Only SYS Only SYS or SYSTEM Any user connected with operating system authentication Any user who has the SYSDBA privilege Any user with either the SYSDBA or the SYSOPER privilege

11. When using RMAN to restore a controlfile auto-backup, you may need to supply a piece of information. What? (Choose the best answer.) A. B. C. D. E. The database name The approximate time of the latest backup The database ID The instance name The instance number

12. You are using RMAN to perform incomplete recovery. Which of the following is the best sequence to follow? (Choose the best answer.) A. B. C. D. E. shutdown abort / backup / startup mount / restore / recover / open resetlogs shutdown abort / startup mount / restore / recover / open resetlogs / backup shutdown immediate / backup / startup mount / restore / open resetlogs / recover shutdown immediate / backup / restore / recover / open resetlogs / backup shutdown immediate / backup / startup nomount / restore / recover / open resetlogs / backup

13. You issue the command ALTER DATABASE BACKUP CONTROLFILE TO TRACE;. Where will the trace file be generated? (Choose the best answer.) A. B. C. D. In the flash recovery area, if it has been configured In the BACKGROUND_DUMP_DEST directory In the USER_DUMP_DEST directory In a platform-specific location, such as $ORACLE_HOME/dbs on Unix

14. After a RESETLOGS, what will have changed? (Choose all that apply.) A. B. C. D. E. F. There will be a new database incarnation number. The system change number will be reset. The log switch sequence number will be reset. The database ID will be changed. The instance number will be changed. All previous backups and archive logs will be invalid

MODULE 3
1. Under which of these circumstances might Flashback Database be of use? (Choose the best answer.) A. To recover a dropped table B. To recover a dropped schema

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

C. To recover a damaged datafile D. To reverse a bad transaction E. All of the above 2. Which of the following is correct about Flashback Database? (Choose two correct answers.) A. B. C. D. E. You should set the FLASHBACK_BUFFER_SIZE parameter. You must create the flashback log files. You must set the DB_RECOVERY_FILE_DEST parameter. You must issue ALTER SYSTEM FLASHBACK ON. You must issue ALTER DATABASE FLASHBACK ON.

3. Why is archivelog mode required to enable Flashback Database? (Choose the best answer.) A. B. C. D. Because the redo log data is needed to reverse changes To recover to an exact time after flashback Because ARCn processes are needed to write flashback data Archivelog mode is optional, it is not required

4. What state must the database be in to turn on the Flashback Database feature? (Choose the best answer.) A. B. C. D. Shutdown Nomount Mount Open

5. Which of the following commands is not necessary for a Flashback Database operation? (Choose all that apply.) A. B. C. D. E. F. Alter database open readonly Alter database open resetlogs Flashback database to... Recover database until... Shutdown Startup mount

6. What tool(s) can be used to perform a database flashback? (Choose the best answer.) A. B. C. D. Database Control and RMAN Database Control and SQL*Plus RMAN and SQL*Plus Database Control, RMAN, and SQL*Plus

7. You have set the DB_FLASHBACK_RETENTION_TARGET to one day, but the flash recovery area does not have room for this much flashback data. What will happen? (Choose the best answer.) A. B. C. D. The database will hang until space is freed up. It will depend on whether AUTOEXTEND has been enabled for the flash recovery area. The database will continue to function, but flashback operations may fail. If any backups in the flash recovery area are not needed according to the retention policy, they will be automatically removed.

8. A user error has occurred, but the effects are limited to one tablespace. You want to flash back this one tablespace, but not the others. What must you do? (Choose the best answer.)

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

A. Execute ALTER TABLESPACE...FLASHBACK OFF for all the other tablespaces, and then flash back the database. B. Take the other datafiles offline, flash back the database, and bring the other datafiles online. C. Flash back the whole database, and then do complete recovery of the other tablespaces. D. It is not possible to flash back one tablespace and leave the rest of the database current. 9. Within RMAN, you issue the command BACKUP RECOVERY AREA. What files in the recovery area will be backed up? (Choose all that apply.) A. B. C. D. E. F. G. RMAN backup sets RMAN image copies Archive redo logs Multiplexed online redo logs Multiplexed controlfile copies Controlfile auto-backups Flashback logs

10. You have enabled Flashback Database, but you suspect that flashback logging is impacting adversely on performance. What could you do? (Choose the best answer.) A. B. C. D. E. Reduce the DB_FLASHBACK_RETENTION_TARGET parameter. Tune the frequency of RVWR writes. Stop flashback logging for some tablespaces. Investigate the flashback log multiplexing and archiving strategy. Tune the flashback buffer.

MODULE 4
1. Different Flashback technologies use different data structures. For each technology, A to G, choose the data structure, i to v, upon which it relies. A. B. C. D. E. F. G. Use of DBMS_FLASHBACK i. The redo log (online and/or archive) Flashback Database ii. Undo segments Flashback Drop iii. The recycle bin Flashback Table Query iv. The flashback log Flashback Transaction Query v. RMAN backups, in the flash recovery area Flashback Version Query SELECT ... AS OF ....

2. When you drop a table, what objects will go into the recycle bin? (Select all that apply.) A. B. C. D. E. F. G. H. I. J. The table Grants on the table Indexes on the table All constraints on the table All constraints on the table except foreign key constraints 3. After dropping a table, how can you access the rows within it? (Choose the best answer.) Query the table using the AS OF syntax. Query the table using the BEFORE DROP syntax. Query the table using its recycle bin name. You cant query it until it has been recovered.

4. If a table has been dropped and then another table created with the same name, which of the following statements is correct? (Choose the best answer.)

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

A. B. C. D.

You must rename the new table before you can flash back the dropped one. You can flash back the dropped table if you specify a new name for it. You can flash back the dropped table into a different schema. You must drop the new table before flashing back the old one.

5. Under which of the following circumstances will Flashback Drop work? (Choose the best answer.) A. B. C. D. E. When a table has been truncated When a table has been purged When a user has been dropped When an index has been dropped None of the above

6. There are two tables in the recycle bin with the same original name. What will happen if you issue a FLASHBACK TABLE <original_name> TO BEFORE DROP command? (Choose the best answer.) A. B. C. D. The command will return an error. The oldest recycle bin table will be recovered. The newest recycle bin table will be recovered. You cant have two tables in the recycle bin with the same original name.

7. If a Flashback Table operation violates a constraint, what will happen? (Choose the best answer.) A. B. C. D. The row concerned will not be flashed back, but the rest of the operation will succeed. The flashback operation will hang until the problem is fixed. The flashback operation will be rolled back. You must disable constraints before a table flashback.

8. What is the best technique to flash back two tables in a foreign key relationship? (Choose the best answer.) A. B. C. D. Flash back the child table, and then the parent table. Flash back the parent table, and then the child table. Flash back both tables in one operation. This is not an issue; foreign key constraints are not protected by flashback.

9. Why and when must you enable row movement on a table before a flashback operation? (Choose the best answer.) A. Flashback Drop requires row movement, because all the rows in the table will have a different object number. B. Flashback Query requires row movement, because the rows will have new ROWIDs picked up from the undo segment. C. Flashback Transaction requires row movement, because any affected rows may be moved as the transaction is reversed. D. Flashback Table requires row movement, because any affected rows may be moved as the changes are reversed. 10. Study the following screen. Which statements are correct? (Choose two answers.)

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

A. B. C. D. E.

The delete of Zamibia and the insert of Namibia are uncommitted changes. There cannot be a unique constraint on CID for this sequence to be possible. There is currently only one row in the table. If another session queried the table, it would see Zambia. If another session queried the table, it would see Namibia.

11. What information can you extract from the pseudo-columns displayed by a Flashback Versions Query? (Choose all that apply.) A. B. C. D. E. F. G. The timestamps marking the beginning and end of a versions existence The SCNs marking the beginning and end of a versions existence The DML operation that created the version The Oracle user that executed the DML The transaction that the DML was part of The statement necessary to reverse the DML The statement necessary to repeat the DML

12. Which of the following statements are correct about flashback, undo, and retention? (Choose two answers.) A. Setting RETENTION GUARANTEE on a user data tablespace will ensure that a Flashback Drop will succeed, if carried out within the UNDO_RETENTION period. B. Setting RETENTION GUARANTEE on an undo tablespace will ensure that a Flashback Query will succeed, if carried out within the UNDO_RETENTION period. C. RETENTION GUARANTEE defaults to true for undo tablespaces, and false for user data tablespaces. D. Flashback Database will always succeed, if the DB_FLASHBACK_RETENTION_TARGET instance parameter is less than the RETENTION_GUARANTEE period. E. Setting the RETENTION_GUARANTEE attribute can cause DML to fail. 13. Which view will display details of all transactions, as extracted from the undo segments? (Choose the best answer.) A. ALL_TRANSACTIONS B. DBA_TRANSACTIONS

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

C. FLASHBACK_TRANSACTION_QUERY D. UNDO_TRANSACTION_QUERY 14. Which tools can be used to flash back the drop of a table? (Choose all that apply.) A. B. C. D. SQL*Plus Database Control RMAN All of the above

15. A Flashback Table operation needs to update a row that another user is already updating. What will happen? A. The session doing the flashback will hang until the other session commits or rolls back his change. B. The flashback operation will not start unless it can get exclusive access to the table. C. The flashback operation will complete, but with an error message stating that the row could not be flashed back. D. The flashback operation will fail, with error message stating that a row or table was locked. 16. When querying DBA_OBJECTS, you see that a user owns an object whose name is BIN$Af3JifupQXuKWSpmW0gaGA==$0. What is true about this object? (Choose the best answer.) A. B. C. D. It is the users recycle bin and contains his dropped tables. It is the users recycle bin and contains his deleted rows. It is a dropped table or index and will be purged automatically when its space is needed. It is a dropped table or index and should be purged manually, because it is taking up space that may be needed for other objects.

Create PDF files without this message by purchasing novaPDF printer (http://www.novapdf.com)

You might also like