ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RMAN CATALOG和NOCATALOG

RMAN CATALOG和NOCATALOG

原创 Linux操作系统 作者:keungyu 时间:2013-07-10 15:12:18 0 删除 编辑

RMAN CATALOGNOCATALOG

RMAN NOCATALOG

定义:使用controlfile控制文件代替CATALOG(    恢复目录)来存储RMAN备份恢复的信息.

 

相关参数:CONTROL_FILE_RECORD_KEEP_TIME该参数为设置备份信息保存时间(单位是天,缺省为7)到规定时间就会自动清除以前的备份信息。该参数存放在$ORACLE_HOME/dbs/initSID.ora

SQL>show parameter control_file_record_keep_time

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7

也可以通过alter system命令进行更改

SQL>alter system set control_file_record_keep_time=14 scope=both;


系统已更改。

SQL> show parameter control_file_record_keep_time;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     14

 

SQL> select name,value,issys_modifiable from v$parameter

                                                where name='control_file_record_keep_time';

 

NAME                            VALUE        ISSYS_MODIFIABLE

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

control_file_record_keep_time                   14           IMMEDIATE

 

RMAN CATALOG(恢复目录)

 

(1).创建Catalog所需要的表空间

SQL>create tablespace rman_ts  datafile '/u01/oracle/oradata/ora10g/rmants.dbf'  size 20M;

 

 

(2).创建RMAN用户并授权

SQL>create user rman identified by rman default tablespace rman_ts quota unlimited on rman_ts;

SQL>grant recovery_catalog_owner to rman;

SQL>grant connect to rman;

SQL>grant resource to rman;

查看角色所拥有的权限:

select * from dba_sys_privs where grantee='RECOVERY_CATALOG_OWNER';

(RECOVER_CATALOG_OWNER,CONNECT,RESOURCE)

 

SQL>  select * from dba_sys_privs where grantee='RECOVERY_CATALOG_OWNER';

 

GRANTEE                        PRIVILEGE                                ADMIN_OPTION

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

RECOVERY_CATALOG_OWNER         CREATE SYNONYM                           NO

RECOVERY_CATALOG_OWNER         CREATE CLUSTER                           NO

RECOVERY_CATALOG_OWNER         ALTER SESSION                            NO

RECOVERY_CATALOG_OWNER         CREATE DATABASE LINK                     NO

RECOVERY_CATALOG_OWNER         CREATE PROCEDURE                         NO

RECOVERY_CATALOG_OWNER         CREATE SEQUENCE                          NO

RECOVERY_CATALOG_OWNER         CREATE TABLE                             NO

RECOVERY_CATALOG_OWNER         CREATE SESSION                           NO

RECOVERY_CATALOG_OWNER         CREATE TYPE                              NO

RECOVERY_CATALOG_OWNER         CREATE VIEW                              NO

RECOVERY_CATALOG_OWNER         CREATE TRIGGER                           NO

 

11 rows selected

 

3.创建恢复目录

oracle>rman catalog rman/rman

RMAN>create catalog tablespace rman_ts;

RMAN>register database;(databasetarget database)

database registered in recovery catalog

starting full resync of recovery catalog

full resync complete

RMAN> connect target /;

 

以后要使用备份和恢复,需要连接到两个数据库中,命令:

oracle>rman target / catalog rman/rman (第一斜杠表示target数据库,catalog表示catalog目录 rman/rman表示catalog用户名和密码)

命令执行后显示:

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Dec 10 15:00:42 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: ORA10G (DBID=3988862108)

connected to recovery catalog database

 

 参考至:http://blog.csdn.net/tianlesoftware/article/details/5641763

感谢原作者

 

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

上一篇: ORACLE-SQL性能调整
下一篇: RMAN体系结构概述
请登录后发表评论 登录
全部评论

注册时间:2012-08-31

  • 博文量
    15
  • 访问量
    41074