加入收藏 | 设为首页 | 会员中心 | 我要投稿 源码网 (https://www.900php.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Oracle Recovery catalog

发布时间:2021-01-24 11:27:37 所属栏目:百科 来源:网络整理
导读:1、在target中创建用户 ****************** 创建用于recovery catalog的表空间 ******************SQL create tablespace rc_data datafile ‘/oracle/app/oracle/oradata/ocm1/rc_data01.dbf‘ size 100M autoextend off;Tablespace created. ***********

1、在target中创建用户

******************
创建用于recovery catalog的表空间
****************** SQL> create tablespace rc_data datafile ‘/oracle/app/oracle/oradata/ocm1/rc_data01.dbf‘ size 100M autoextend off; Tablespace created.
********************
创建rcowner用户
******************** SQL> create user rcowner identified by oracle temporary tablespace temp default tablespace rc_data quota unlimited on rc_data; User created. SQL> grant recovery_catalog_owner to rcowner; Grant succeeded.
********************
创建catalog,应该就是在rcowner下创建一些对象,例如表之类的
******************** [ocm1:oracle]:/home/oracle>rman catalog rcowner/oracle Recovery Manager: Release 11.2.0.1.0 - Production on Fri Jun 21 18:06:03 2019 Copyright (c) 1982,2009,Oracle and/or its affiliates. All rights reserved. connected to recovery catalog database RMAN> RMAN> create catalog; recovery catalog created
可以看到user_tables下已经有了很多表

TABLE_NAME
------------------------------
DB
NODE
CONF
DBINC
CKP
TS
TSATT
DF
SITE_DFATT
TF
SITE_TFATT
OFFR
RR
RT
ORL
RLH
AL
BS
BP
BCF
CCF
XCF
BSF
BDF
CDF
XDF
BRL
BCB
CCB
SCR
SCRL
CONFIG
XAL
RSR
FB
GRSP
NRSP
VPC_USERS
VPC_DATABASES
CFS
BCR
ROUT
RCVER
TEMPRES Recovery Manager complete. [ocm1:oracle]:/home/oracle>sqlplus rcowner/oracle SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 21 18:07:04 2019 Copyright (c) 1982,Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning,OLAP,Data Mining and Real Application Testing options SQL> select object_type,count(*) from user_objects group by object_type; OBJECT_TYPE COUNT(*) ------------------- ---------- SEQUENCE 1 PACKAGE 2 PACKAGE BODY 2 TYPE BODY 1 TRIGGER 3 TABLE 44 INDEX 96 FUNCTION 2 VIEW 98 TYPE 3 10 rows selected.


?

?

2、在target端注册

[ocm:oracle]:/home/oracle>rman target sys/oracle catalog rcowner/oracle@192.168.8.101:1521/ocm1

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Jun 21 18:14:59 2019

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

connected to target database: OCM (DBID=2393802673)
connected to recovery catalog database

RMAN> register database;            --将target数据库的相关备份信息注册到recovery catalog上

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

RMAN> 

RMAN> 

RMAN> resync catalog;          --重新同步

starting full resync of recovery catalog
full resync complete

RMAN> list backup summary;


List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
169     B  F  A DISK        20-JUN-19       1       1       NO         TAG20190620T152155
170     B  F  A DISK        20-JUN-19       1       1       NO         TAG20190620T152155
171     B  F  A DISK        20-JUN-19       1       1       YES        TAG20190620T152502
172     B  F  A DISK        20-JUN-19       1       1       YES        TAG20190620T152502

RMAN> report schema;

Report of database schema for database with db_unique_name OCM

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    700      SYSTEM               YES     /oracle/app/oracle/oradata/ocm/system01.dbf
2    600      SYSAUX               NO      /oracle/app/oracle/oradata/ocm/sysaux01.dbf
3    760      UNDOTBS1             YES     /oracle/app/oracle/oradata/ocm/undotbs01.dbf
4    5        USERS                NO      /rman/user01.dbf
5    100      FDA                  NO      /oracle/app/oracle/oradata/ocm/fda.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    68       TEMP                 32767       /oracle/app/oracle/oradata/ocm/temp01.dbf

(编辑:源码网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读