首页 > 其他 > 详细

RMAN备份 CATALOG

时间:2015-09-24 11:04:42      阅读:214      评论:0      收藏:0      [点我收藏+]

 在存储恢复目录的数据库创建表空间用于存储恢复目录schema及恢复目录数据(本文使用已经创建好的数据库catadb来存储恢复目录)

SQL> create tablespace tbs_rman datafile ‘/s01/orabase/oradata/CWEOLQ/tbs_rman01.dbf‘ size 200m autoextend on;

Tablespace created.

SQL> create user rman identified by rman temporary tablespace temp default tablespace tbs_rman quota unlimited on tbs_rman;--创建rman schema

SQL> grant recovery_catalog_owner to rman;

Grant succeeded.

SQL> conn rman/rman

Connected.

SQL>  select * from session_privs;

PRIVILEGE

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

CREATE SESSION

ALTER SESSION

CREATE TABLE

CREATE CLUSTER

CREATE SYNONYM

CREATE VIEW

CREATE SEQUENCE

CREATE DATABASE LINK

CREATE PROCEDURE

CREATE TRIGGER

CREATE TYPE

11 rows selected.

SQL> select * from session_roles;

ROLE

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

RECOVERY_CATALOG_OWNER

进入要备份的数据库:

RMAN> connect catalog rman/rman@CWEOLQ;

connected to recovery catalog database

RMAN> create catalog tablespace tbs_rman;

recovery catalog created

[oracle@cwogg admin]$ rman target sys/123123@PHUB catalog rman/rman@CWEOLQ --连接目标库和恢复目录数据库

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Sep 24 10:25:47 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: PHUB (DBID=536511065)

connected to recovery catalog database

RMAN> register database; --将目标库注册到恢复目录

database registered in recovery catalog

starting full resync of recovery catalog

full resync complete


全备数据库:

run{

allocate channel ch1 device type disk;

backup as compressed backupset

database plus archivelog delete input

format=‘+DATA/backup/full_%d_%U‘

tag=‘full_bak‘;

7> release channel ch1;}

released channel: ORA_DISK_1

released channel: ORA_DISK_2

allocated channel: ch1

channel ch1: SID=68 device type=DISK,,,,


RMAN备份 CATALOG

原文:http://7642644.blog.51cto.com/7632644/1697734

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!