ITPub博客

首页 > 数据库 > Oracle > [20151022]Create Recovery Catalog.txt

[20151022]Create Recovery Catalog.txt

原创 Oracle 作者:lfree 时间:2015-10-22 09:23:04 0 删除 编辑
[20151022]Create Recovery Catalog.txt

--要测试rman catalog的一些我问题,做一个建立的记录(实际上以前做过):

1.CONNECT sys/password AS SYSDBA

CREATE TABLESPACE rman DATAFILE
  '/u01/app/oracle11g/oradata/test/rman01.dbf' SIZE 64M AUTOEXTEND ON NEXT 16M MAXSIZE UNLIMITED
LOGGING
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT MANUAL
FLASHBACK ON;

-- Create rman schema owner
CREATE USER rman IDENTIFIED BY rman
TEMPORARY TABLESPACE temp
DEFAULT TABLESPACE rman
QUOTA UNLIMITED ON rman;

GRANT connect, resource, recovery_catalog_owner TO rman;

2.Create the recovery catalog.

===以前建立过1次,版本太低,我升级到11.2.0.3.
$ rlwrap rman  catalog=rman/rman
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Oct 22 08:35:04 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to recovery catalog database
PL/SQL package RMAN.DBMS_RCVCAT version 11.02.00.01 in RCVCAT database is not current
PL/SQL package RMAN.DBMS_RCVMAN version 11.02.00.01 in RCVCAT database is not current

RMAN> drop catalog ;
recovery catalog owner is RMAN
enter DROP CATALOG command again to confirm catalog removal

--需要再执行一次。
RMAN> drop catalog
recovery catalog dropped
===========

$ rman catalog=rman/rman
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Nov 30 11:56:59 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to recovery catalog database
RMAN> create catalog tablespace "RMAN";
recovery catalog created
RMAN>

3.Register Database

Each database to be backed up by RMAN must be registered with the catalog.

$ rman catalog=rman/rman@rman target=sys/btbtms
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Nov 30 12:02:41 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: TEST (DBID=2060755746)
connected to recovery catalog database

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN>

4.unregister database:
RMAN> unregister database;

database name is "TEST" and DBID is 2060755746

Do you really want to unregister the database (enter YES or NO)? YES
database unregistered from the recovery catalog

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

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2471
  • 访问量
    6279481