ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Catalog Backups / Archivelogs / Datafile Copies / Controlfile Copies-470463.1

Catalog Backups / Archivelogs / Datafile Copies / Controlfile Copies-470463.1

原创 Linux操作系统 作者:rongshiyuan 时间:2013-06-27 09:16:42 0 删除 编辑

How To Catalog Backups / Archivelogs / Datafile Copies / Controlfile Copies [ID 470463.1]

 

In this Document

Goal
Solution

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.8 to 11.1.0.6 [Release 9.2 to 11.1]
Information in this document applies to any platform.
***Checked for relevance on 29-Apr-2013***


Goal

How to catalog backups / archivelogs / datafile copies / controlfile copies etc. in various versions of oracle.


Solution

The RMAN CATALOG command is used to accomplish the following :

+ Add backup pieces and image copies on disk to the RMAN repository.

+ Record a datafile copy as a level 0 incremental backup in the RMAN repository, which enables you to use it as part of an incremental backup strategy.

+ Record the existence of the last user-managed datafile copies made after the final shutdown


Restrictions and Usage Notes

+ You must be connected to the target database, which must be mounted or open.

+ If RMAN is connected to a recovery catalog, then the catalog database must be open.

+ For a user-managed copy to be cataloged, it must be a datafile copy, control file copy, archived log, or backup piece.

+ Accessible on disk.

+ You cannot use CATALOG to catalog a file that belongs to a different database.

RMAN treats all user-managed backups as image copies. Note that during cataloging, RMAN does not check whether the file was correctly copied by the operating system utility: it just checks the header.


Examples :

1. Cataloging an Archived Redo Log:
This example assumes that you made operating system copies of archived logs or transferred them from another location, and then added them to the RMAN repository:

CATALOG ARCHIVELOG '?/oradata/archive1_30.dbf', '?/oradata/archive1_31.dbf',
'?/oradata/archive1_32.dbf';


2. Cataloging a File Copy as an Incremental Backup:
The following example catalogs datafile copy users01.bak as an incremental level 0 backup:

CATALOG DATAFILECOPY '?/oradata/users01.bak' LEVEL 0;

Note that you can create datafile copies either using the RMAN BACKUP AS COPY command, or by using operating system utilities in conjunction with ALTER TABLESPACE BEGIN/END BACKUP.



3. The folllowing example catalogs a user managed controlfile copy in the RMAN repository :

The command to take a controlfile copy is below :
sql> alter database backup controlfile to 'disk1/control01.ctl';

The command to catalog a controlfile copy is below :
RMAN> catalog controlfilecopy '/disk1/control01.ctl';


4. Cataloging Multiple Copies in a Directory:
The following example catalogs a directory full of archived logs that were copied into the /tmp/arch_logs directory with an operating system utility:

CATALOG START WITH '/tmp/arch_logs';


5. Cataloging Files in the Flash Recovery Area:
The following example catalogs all files in the currently enabled flash recovery area without prompting the user for each one:

CATALOG RECOVERY AREA NOPROMPT;

6. Cataloging Backup Pieces:
The following example catalogs a RMAN backup piece that was copied with an operating system utility:

CATALOG BACKUPPIECE '?/oradata/01dmsbj4_1_1.bcp';


7. The below command will catalog the backup pieces held in the location set for db_recovery_file_dest parameter:

RMAN> catalog db_recovery_file_dest;

All the above 7 examples are valid for 10g and 11g but the examples 4,5,6 and 7 are not possible for 9i as these features are not available in 9i.

Catalog backuppiece, catalog recovery area, catalog start with, catalog db_recovery_file_dest commands are not available in 9i.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17252115/viewspace-764903/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-11-24

  • 博文量
    798
  • 访问量
    3241638