(RMAN)使用恢复目录数据库执行RMAN

简介: 第一步:Create Recovery Catalog         First create a user to hold the recovery catalog:   ...
第一步:Create Recovery Catalog
         First create a user to hold the recovery catalog:
          -- Create tablepsace to hold repository
         SQL> create tablespace rman_tools
                2  datafile
                3  'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10\rman01.dbf'
                4  size 100m;
          Tablespace created
          -- Create rman schema owner
         SQL> create user rman
                2  identified by rman123
                3  default tablespace rman_tools
                4  quota unlimited on rman_tools;
           User created
 
          C:\Documents and Settings\zouyang> rman catalog  rman/rman123@orcl10
             Recovery Manager: Release 10.1.0.2.0 - Production
             Copyright (c) 1995, 2004, Oracle.  All rights reserved.
             RMAN-00571: ===============================================
             RMAN-00569: ====== ERROR MESSAGE STACK FOLLOWS ==========
             RMAN-00571: ===============================================
             RMAN-00554: initialization of internal recovery manager package failed
             RMAN-04004: error from recovery catalog database: ORA-01045: user RMAN lacks CREATE SESSION privilege; logon denied
           --  报错!要给rman用户分配一定的权限!
          SQL> grant  connect, resource, create session, recovery_catalog_owner
                2        to rman;
           Grant succeeded
 
          C:\Documents and Settings\zouyang> rman  catalog  rman/rman123@orcl10
           Recovery Manager: Release 10.1.0.2.0 - Production
           Copyright (c) 1995, 2004, Oracle.  All rights reserved.
           connected to recovery catalog database
           recovery catalog is not installed
 
          RMAN>  create catalog tablespace rman_tools;
           recovery catalog created       ——很好!!建立了!!
         
          可是,当我重新连接,显示RMAN设置信息时又报错了!!
          C:\Documents and Settings\zouyang> rman target sys/system catalog  rman/rman123@orcl10
          Recovery Manager: Release 10.1.0.2.0 - Production
          Copyright (c) 1995, 2004, Oracle.  All rights reserved.
          connected to target database: ORCL (DBID=1227672490)
          connected to recovery catalog database
          RMAN>  show channel for device type disk;
          RMAN configuration parameters are:
          RMAN-00571: ===============================================
          RMAN-00569: ========= ERROR MESSAGE STACK FOLLOWS =======
          RMAN-00571: ===============================================
          RMAN-03002: failure of show command at 10/14/2009 10:32:36
          RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001:  target database not found in recovery catalog
          RMAN>
 
          又在网上查找原因,原来还需要注册数据库!!
第二步:Register Database
         Each database to be backed up by RMAN must be registered!
         RMAN> register database;
          database registered in recovery catalog
          starting full resync of recovery catalog
          full resync complete
         RMAN> show channel for device type disk;
          RMAN configuration parameters are:CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   'D:\BACKUP\RMAN\%d_%s.bak';
         RMAN>
   
         成功啦!!!
目录
相关文章
|
4月前
|
Oracle 安全 关系型数据库
|
4月前
|
存储 Oracle 关系型数据库
|
4月前
|
存储 Oracle 关系型数据库
关系型数据库Oracle运行RMAN脚本
【7月更文挑战第23天】
49 4
|
4月前
|
SQL Oracle 关系型数据库
关系型数据库Oracle设置 RMAN 环境:
【7月更文挑战第25天】
66 2
|
4月前
|
监控 Oracle 算法
|
4月前
|
SQL Oracle 关系型数据库
关系型数据库Oracle结束 RMAN 会话:
【7月更文挑战第25天】
78 1
|
4月前
|
Oracle 关系型数据库 数据库
关系型数据库Oracle编写RMAN脚本
【7月更文挑战第23天】
41 2
|
4月前
|
Oracle 关系型数据库 数据库
关系型数据库Oracle执行RMAN脚本
【7月更文挑战第22天】
61 2
|
4月前
|
Oracle 关系型数据库 数据库连接
|
5月前
|
存储 关系型数据库 MySQL