Oracle 11gOCP 053 v12.02 300--600题部分疑问答案更正

346 - RMAN report unrecoverable

What is the impact of the results of the output of the following command? 

RMAN> report unrecoverable database; 

Report of files that need backup due to unrecoverable operations 

File Type of Backup Required Name 

4 full or incremental C:\ORACLE\ORADATA\ORCL\USERS01.DBF 

A. There are no backup sets with any backups of the users01.dbf datafile. 

B. The users01.dbf datafile has had unrecoverable operations occur in it. It will need to be backed up or some data loss is possible during a recovery. 

C. The users01.dbf datafile is corrupted. 

D. The users01.dbf datafile backup exceeds the retention criteria. 

E. The last backup of the users01.dbf datafile failed and must be rerun.

解析:

http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmquick.htm#BRADV131

Reporting on Database Files and Backups

The REPORT command performs more complex analysis than LIST. Some main options are shown in Table 2-5.

Table 2-5 REPORT Options

Option

Example

Explanation

NEED BACKUP

REPORT NEED BACKUP DATABASE

Shows which files need backing up under current retention policy. Use optionalREDUNDANCY and RECOVERY WINDOW parameters to specify different criteria.

OBSOLETE

REPORT OBSOLETE

Lists backups that are obsolete under the configured backup retention policy. Use the optional REDUNDANCY and RECOVERY WINDOW parameters to override the default.

SCHEMA

REPORT SCHEMA

Reports the tablespaces and data files in the database at the current time (default) or a different time.

UNRECOVERABLE

REPORT UNRECOVERABLE

Lists all data files for which an unrecoverable operation has been performed against an object in the data file since the last backup of the data file.

 

To generate reports of database files and backups:

1. Start RMAN and connect to a target database.

2. Run the REPORT command at the RMAN prompt.

The following example reports backups that are obsolete according to the currently configured backup retention policy:

REPORT OBSOLETE;

The following example reports the data files and temp files in the database:

REPORT SCHEMA;

http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2006.htm#RCMRF147

UNRECOVERABLE reportObject

Lists all unrecoverable data files. See Table 3-7 for description of output.

A data file is considered unrecoverable if an unrecoverable operation has been performed against an object residing in the data file since the last backup of the data file. In an unrecoverable operation, redo is not generated. Examples are direct load of table data and updates with the NOLOGGING option.

Note: The nonexistence of any backup of a data file is not sufficient reason to consider it unrecoverable. Such data files can be recovered through the use of the CREATE DATAFILE command, if redo logs starting from when the file was created still exist.

 

needBackupOption::=

reportObject::=

atClause::=

 

Answer:B




419.

In Oracle 11g, by default which one of the following conditions implicitly enables Automatic PGA 

Memory Management? 

A. Setting a nonzero value for SGA_TARGET 

B. Configuring Automatic Shared Memory Management 

C. Configuring Automatic Memory Management 

D. Setting a nonzero value for SGA_MAX_SIZE and PGA_AGGREGATE_TARGET 

E. None of the above 


Answer:C




498.

The database Is configured in ARCHIVELOG mode. The database needs to be up 24 X 7. You want 

to perform user managed backup for the data files of the HR_DATA tablespace. To accomplish the task, 

you issued the following command: 

SQL> ALTER TABLESPACE hi_data BEGIN BACKUP; 

Which two statements are true in this scenario? (Choose two.) 

A. No transaction on the tablespace is allowed but you can perform queries. 

B. The tablespace will automatically come out of backup mode when the file copy is complete. 

C. The checkpoint change number is frozen in headers of the data files until the file is removed from 

backup mode. 

D. The database writes the before image of an entire block to the redo stream before modifying. block tor 

the first time. 


Answer:CD




501.

Note the output of the following query; 

SQL> SELECT flashback_archieve_name, status FROM dba_flashback_archieve; 

FLASHBACK_ARCHIEVE_NAME STATUS 

FLA1 

You executed the following command to enable Flashback Data Archive on the EXCHANGB_PATE table: 

ALTER TABLE exchange_rate FLASHBACK ARCHIEVE; 

What is the outcome of this command? 

A. The table uses the default Flashback Data Archive. 

B. The Flashback Data Archive Is created In the SYSAUX tablespace. 

C. The Flashback Data Archive is created in the same tablespace where the tables are stored. 

D. The command generates an error because no flashback Data Archive name is specified and there is 

no default Flashback Data Achieve. 


Answer:D




505 - RMAN redundancy

You configured the default backup device type as disk for RMAN backups. In your database, because of business requirements, you have to take a simultaneous duplicate backup of the data files when the RMAN BACKUP command is used. What must you set using the RMAN CONFIGURE command to achieve this? 

A. MAXSETSIZE TO 2; 

B. DEVICE TYPE DISK PARALLELISM 2; 

C. RETENTION POLICY TO REDUNDANCY 2; 

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

解析:

http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmconfa.htm#BRADV139

Configuring Backup Duplexing

You can use the CONFIGURE ... BACKUP COPIES command to specify how many copies of each backup piece should be created on the specified device type for the specified type of file. This type of backup is known as a duplexed backup set. The CONFIGURE settings for duplexing only affect backups of data files, control files, and archived logs into backup sets, and do not affect image copies.

Note:

A control file autobackup is never duplexed.

RMAN can duplex backups to either disk or tape, but cannot duplex backups to tape and disk simultaneously. When backing up to tape, ensure that the number of copies does not exceed the number of available tape devices. The following examples show possible duplexing configurations:

# Makes 2 disk copies of each data file and control file backup set

# (autobackups excluded)

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;

# Makes 3 copies of every archived redo log backup to tape

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE sbt TO 3;

To return a BACKUP COPIES configuration to its default value, run the same CONFIGURE command with the CLEAR option, as in the following example:

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE sbt CLEAR;

By default, CONFIGURE ... BACKUP COPIES is set to 1 for each device type.

http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckad.htm#BRADV89570

Duplexing Backup Sets with CONFIGURE BACKUP COPIES

As explained in "Configuring Backup Duplexing", the CONFIGURE ... BACKUP COPIES command specifies the number of identical backup sets to create on the specified device type. This setting applies to all backup sets except control file autobackups (because the autobackup of a control file always produces one copy) and backup sets when backed up with the BACKUP BACKUPSET command.

To duplex a backup with CONFIGURE ... BACKUP COPIES:

1. Configure the number of copies on the desired device type for datafiles and archived redo logs on the desired device types.

By default, CONFIGURE ... BACKUP COPIES is set to 1 for each device type. The following example configures duplexing for datafiles and archived logs on tape and also duplexing for datafiles (but not archived redo logs) on disk:

CONFIGURE DEVICE TYPE sbt PARALLELISM 1;

CONFIGURE DEFAULT DEVICE TYPE TO sbt;

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/disk1/%U', '/disk2/%U';

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE sbt TO 2;

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE sbt TO 2;

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;

2. Execute the BACKUP command.

The following command backs up the database and archived logs to tape, making two copies of each data file and archived log:

BACKUP AS BACKUPSET DATABASE PLUS ARCHIVELOG;

Because of the configured formats for the disk channel, the following command backs up the database to disk, placing one copy of the backup sets produced in the /disk1 directory and the other in the /disk2 directory:

BACKUP DEVICE TYPE DISK AS BACKUPSET DATABASE;

If the FORMAT clause were not configured on CONFIGURE CHANNNEL, then you specify FORMAT on the BACKUP command itself. For example, you issue the following command:

BACKUP AS BACKUPSET DATABASE 

  FORMAT '/disk1/%U', 

         '/disk2/%U';

3. Issue a LIST BACKUP command to see a listing of backup sets and pieces.

For example, enter the following command:

LIST BACKUP SUMMARY;

The #Copies column shows the number of backup sets, which may have been produced by duplexing or by multiple backup commands.

See Also:

"Configuring Backup Duplexing" to learn about the CONFIGURE BACKUP COPIES command, and "Configuring the Environment for RMAN Backups" to learn about basic backup configuration options

 

Answer:D




510 - RMAN report need backup

You executed the following command in Recovery Manager (RMAN): 

RMAN> REPORT NEED BACKUP days 3; 

What is the output of this command? 

A. a list of files that require a backup within three days 

B. a list of files requiring more than 3 days of archive logs to apply 

C. a list of files that RMAN recommends be backed up only once in every three days, based on low volatility 

D. a list of files for which a backup has already been performed in the last three days and which is required to be backed up again based on the high number of transactions performed on them 

解析:

http://docs.oracle.com/cd/E18283_01/backup.112/e10642/rcmreprt.htm#

About Reports of RMAN Backups

You can use the REPORT command to answer important questions, such as:

· Which files need a backup?

· Which files have had unrecoverable operations performed on them?

· Which backups are obsolete and can be deleted?

· What was the physical schema of the target database or a database in the Data Guard environment at some previous time?

· Which files have not been backed up recently?

Reports enable you to confirm that your backup and recovery strategy is in fact meeting your requirements for database recoverability. The two major forms of REPORT used to determine whether your database is recoverable are:

· REPORT NEED BACKUP

Reports which database files need to be backed up to meet a configured or specified retention policy

· REPORT UNRECOVERABLE

Reports which database files require backup because they have been affected by some NOLOGGING operation such as a direct-path INSERT

The RMAN repository contains other information that you can access with the REPORT command. Table 11-3 summarizes the REPORT options.

Table 11-3 REPORT Options

Contents of Report

Command

Description

Obsolete backups

REPORT OBSOLETE

Full backups, datafile copies, and archived redo logs recorded in the RMAN repository that can be deleted because they are no longer needed

Database schema

REPORT SCHEMA

The names of all datafiles (permanent and temporary) and tablespaces for the target database at the specified point in time. If you use RMAN in a Data Guard environment, then you can report the schema for a specified DB_UNIQUE_NAME.

 

See Also:

Oracle Database Backup and Recovery Reference for a description of the REPORT command

Reporting on Files Needing a Backup Under a Retention Policy

Use the REPORT NEED BACKUP command to determine which database files need backup under a specific retention policy.

With no arguments, REPORT NEED BACKUP reports which objects need backup under the currently configured retention policy. The output for a configured retention policy of REDUNDANCY 1 is similar to this example:

RMAN> REPORT NEED BACKUP;

 

RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 1

Report of files with less than 1 redundant backups

File #bkps Name

---- ----- -----------------------------------------------------

2    0     /oracle/oradata/trgt/undotbs01.dbf

 

Using RMAN REPORT NEED BACKUP with Different Retention Policies

You can specify different criteria for REPORT NEED BACKUP, using one of the following forms of the command:

· REPORT NEED BACKUP RECOVERY WINDOW OF n DAYS

Displays objects requiring backup to satisfy a recovery window-based retention policy

· REPORT NEED BACKUP REDUNDANCY n

Displays objects requiring backup to satisfy a redundancy-based retention policy

· REPORT NEED BACKUP DAYS n

Displays files that require more than n days' worth of archived redo log files for recovery

· REPORT NEED BACKUP INCREMENTAL n

Displays files that require application of more than n incremental backups for recovery

Using RMAN REPORT NEED BACKUP with Tablespaces and Datafiles

The REPORT NEED BACKUP command can check the entire database, skip specified tablespaces, or check only specific tablespaces or datafiles against different retention policies, as shown in the following examples:

REPORT NEED BACKUP RECOVERY WINDOW OF 2 DAYS DATABASE SKIP TABLESPACE TBS_2;

REPORT NEED BACKUP REDUNDANCY 2 DATAFILE 1;

REPORT NEED BACKUP TABLESPACE TBS_3; # uses configured retention policy

REPORT NEED BACKUP INCREMENTAL 2; # checks entire database

See Also:

Oracle Database Backup and Recovery Reference for all possible options for REPORT NEED BACKUP and an explanation of the various column headings in the output

Using REPORT NEED BACKUP with Backups on Tape or Disk Only

You can limit the backups tested by the REPORT NEED BACKUP command to disk-based or tape-based backups only, as shown in these examples:

REPORT NEED BACKUP RECOVERY WINDOW OF 2 DAYS DATABASE DEVICE TYPE sbt;

REPORT NEED BACKUP DEVICE TYPE DISK;

REPORT NEED BACKUP TABLESPACE TBS_3 DEVICE TYPE sbt; 

 

Answer:B

511.

You have configured flash recovery area in your database and you set the following Initialization 

parameters for your database instance: 

LOG_ARCHIVE_DEST 1 = ,,LOCATION=/disk1/arch MANDATORY' 

LOG _ARCHIEVE_DEST 2 = ,,LOCATION=/disk2/arch' 

LOG_ARCHIVK_DEST_3 = ,,LOCATION=/diSk3/arch 

LOG_ARCH1VK_DEST_4 = ' LOCATION=/disk4/arch' 

LOG_ARCHIVE_MIN-SUCCEED_DEST = 2 

While the database instance is functional, you realized that the destination set by the 

LOG_ARCHIVE_DEST_I parameter Is not available for the archived redo log file to be created in. All redo 

log groups have been used. What happens in an event of log switch? 

A. The online redo log file Is not allowed to be overwritten. 

B. The archived redo log files are written to the flash recovery area until the MANDATORY destination is 

made available. 

C. The database instance will crash because the archived redo log file cannot be created in a destination 

set as MANDATORY. 

D. The destination set by the LOG_ARCHIVE_DEST_1 parameter is ignored and the archived redo log 

files are created in the next two available locations to guarantee archive log success. 


Answer:A


512 - Scheduler 

Which two statements correctly describe the relationship among the Scheduler components: job, program, and schedule? (Choose two) 

A. A job is specified as part of a program definition


B. A program can be used in the definition of multiple jobs 

C. A program and job can be specified as part of a schedule definition 

D. A program and schedule can be specified as part of a job definition 

解析:

http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_sched.htm#ARPLS72306

CREATE_PROGRAM Procedure

This procedure creates a program.

Syntax

DBMS_SCHEDULER.CREATE_PROGRAM (

   program_name             IN VARCHAR2,

   program_type             IN VARCHAR2,

   program_action           IN VARCHAR2,

   number_of_arguments      IN PLS_INTEGER DEFAULT 0,

   enabled                  IN BOOLEAN DEFAULT FALSE,

   comments                 IN VARCHAR2 DEFAULT NULL);

Parameters

Table 129-30 CREATE_PROGRAM Procedure Parameters

Parameter

Description

program_name

The name to assign to the program. The name must be unique in the SQL namespace. For example, a program cannot have the same name as a table in a schema. If no name is specified, then an error occurs.

program_type

This attribute specifies the type of program you are creating. If it is not specified then you get an error. There are three supported values for program_type:

· 'PLSQL_BLOCK'

This specifies that the program is a PL/SQL block. Job or program arguments are not supported when the job or program type is PLSQL_BLOCK. In this case, the number of arguments must be 0.

· 'STORED_PROCEDURE'

This specifies that the program is a PL/SQL or Java stored procedure, or an external C subprogram. Only procedures, not functions with return values, are supported. PL/SQL procedures with INOUT or OUT arguments are not supported.

· 'EXECUTABLE'

This specifies that the program is external to the database. External programs imply anything that can be executed from the operating system command line. AnyData arguments are not supported with job or program type EXECUTABLE.

program_action

This attribute specifies the action of the program. The following actions are possible:

· For a PL/SQL block, the action is to execute PL/SQL code. These blocks must end with a semicolon.

For example, my_proc(); or BEGIN my_proc(); END; or DECLARE arg pls_integer:= 10; BEGIN my_proc2(arg); END;.

Note that the Scheduler wraps job_action in its own block and passes the following to PL/SQL for execution: DECLARE ... BEGIN job_action END; This is done to declare some internal Scheduler variables. You can include any Scheduler metadata attribute except event_message in your PL/SQL code. You use the attribute name as you use any other PL/SQL identifier, and the Scheduler assigns it a value. See Table 129-39 for details on available metadata attributes.

If it is an anonymous block, special Scheduler metadata may be accessed using the following variable names: job_name,job_owner, job_start, window_start, window_end. For more information, see the "DEFINE_METADATA_ARGUMENT Procedure".

· For a stored procedure, the action is the name of the stored procedure. You have to specify the schema if the procedure resides in a schema other than the job.

If case sensitivity is needed, enclose the schema name and the store procedure name in double quotes. For example,program_action=>'"Schema"."Procedure"'.

· For an executable, the action is the name of the external executable, including the full path name, but excluding any command-line arguments. If the action starts with a single question mark ('?'), the question mark is replaced by the path to the Oracle home directory for a local job or to the Scheduler agent home for a remote job. If the action contains an at sign ('@') and the job is local, the at sign is replaced with the SID of the current Oracle instance.

If program_action is not specified, an error is generated

number_of_arguments

This attribute specifies the number of arguments the program takes. If this parameter is not specified, then the default is 0. A program can have a maximum of 255 arguments.

If the program_type is PLSQL_BLOCK, then this parameter is ignored.

enabled

This flag specifies whether the program should be created as enabled or not. If the flag is set to TRUE, then validity checks are made and the program is created as ENABLED if all the checks be successful. By default, this flag is set to FALSE, meaning not created enabled. You can also call the ENABLE procedure to enable the program before it can be used.

comments

A comment about the program. By default, this attribute is NULL.

 

Usage Notes

To create a program in their own schema, users need the CREATE