OCP-1Z0-053-V12.02-546题

546.You want to put a specific tablespace called MY_DATA in hot backup mode so you can back it up.

What command would you use?

A. alter tablespace MY_DATA begin backup;

B. alter tablespace MY_DATA start backup;

C. alter tablespace MY_DATA backup begin;

D. alter MY_DATA begin backup;

E. You cannot back up individual tablespaces.

Answer: A

答案解析:

参考:http://blog.csdn.net/rlhua/article/details/12682217
启动备份模式:复制数据文件之前,必须将每个数据文件都置于备份模式。请使用ALTER TABLESPACE和ALTER DATABASE命令的BEGIN BACKUP子句来执行此操作。

Making User-Managed Backups of Online Read/Write Tablespaces

You must put a read/write tablespace in backup mode to make user-managed data file backups when the tablespace is online and the database is open.

The ALTER TABLESPACE ... BEGIN BACKUP statement places a tablespace in backup mode.

 In backup mode, the database copies whole changed data blocks into the redo stream. After you take the tablespace out of backup mode with the ALTER TABLESPACE ... END BACKUP or ALTER DATABASE END BACKUP statement, the database advances the data file checkpoint SCN to the current database checkpoint SCN.

When restoring a data file backed up in this way, the database asks for the appropriate set of redo log files to apply if recovery is needed. The redo logs contain all changes required to recover the data files and make them consistent.

To back up online read/write tablespaces in an open database:

  1. Before beginning a backup of a tablespace, use the DBA_DATA_FILES data dictionary view to identify all of the data files in the tablespace. For example, assume that you want to back up the users tablespace. Enter the following:

    SELECT TABLESPACE_NAME, FILE_NAME
    FROM   SYS.DBA_DATA_FILES
    WHERE  TABLESPACE_NAME = 'USERS';
     
    TABLESPACE_NAME                   FILE_NAME
    -------------------------------   --------------------
    USERS                             /oracle/oradata/trgt/users01.dbf
    USERS                             /oracle/oradata/trgt/users02.dbf
  2. Mark the beginning of the online tablespace backup. For example, the following statement marks the start of an online backup for the tablespace users:

    SQL> ALTER TABLESPACE users BEGIN BACKUP;

    Caution:

    If you do not use  BEGIN  BACKUP to mark the beginning of an online tablespace backup and wait for this statement to complete before starting your copies of online tablespaces, then the data file copies produced are not usable for subsequent recovery operations. Attempting to recover such a backup is risky and can return errors that result in inconsistent data. For example, the attempted recovery operation can issue a  fuzzy file warning, and can lead to an inconsistent database that you cannot open.
  3. Back up the online data files of the online tablespace with operating system commands. For example, Linux and UNIX users might enter:

    % cp /oracle/oradata/trgt/users01.dbf /d2/users01_'date "+%m_%d_%y"'.dbf
    % cp /oracle/oradata/trgt/users02.dbf /d2/users02_'date "+%m_%d_%y"'.dbf
  4. After backing up the data files of the online tablespace, run the SQL statement ALTER TABLESPACE with the END BACKUP option. For example, the following statement ends the online backup of the tablespace users:

    SQL> ALTER TABLESPACE users END BACKUP;
  5. Archive the unarchived redo logs so that the redo required to recover the tablespace backup is archived. For example, enter:

    SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;

    Caution:

    If you fail to take the tablespace out of backup mode, then Oracle Database continues to write copies of data blocks in this tablespace to the online redo logs, causing performance problems. Also, you receive an  ORA-01149 error if you try to shut down the database with the tablespaces still in backup mode.
官方参考: http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osbackup.htm#BRADV488
 

 

你可能感兴趣的:(OCP-1Z0-053-V12.02-546题)