RMAN CATALOG和Nocatalog

1.nocatalog方式
Nocatalog方式 就是用control file作为catalog,每一次备份都要往控制文件里面写好多备份信息,控制文件里面会有越来越多的备份信息。因此,当使用rman nocatalog方式备份时,备份controlfile是非常重要的。https://www.cndba.cn/hbhe0316/article/4762

sys@CXMTDB 16:45:33> select name,value,issys_modifiable from v$parameter where name='control_file_record_keep_time';

NAME                   VALUE            ISSYS_MOD
------------------------------ -------------------- ---------
control_file_record_keep_time  7            IMMEDIATE

Elapsed: 00:00:00.01
sys@CXMTDB 16:45:34> alter system set control_file_record_keep_time=14 scope=both;

System altered.

Elapsed: 00:00:00.02
sys@CXMTDB 17:21:23> select name,value,issys_modifiable from v$parameter where name='control_file_record_keep_time';

NAME                   VALUE            ISSYS_MOD
------------------------------ -------------------- ---------
control_file_record_keep_time  14            IMMEDIATE

Elapsed: 00:00:00.00
sys@CXMTDB 17:21:32> show parameter control

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time         integer     14
control_files                 string     /oradata/CXMTDB/control01.ctl,
                          /oradata/CXMTDB/control02.ctl
control_management_pack_access         string     DIAGNOSTIC+TUNING

2.catalog方式
Catalog 则必须要首先要创建目录备份数据库,建立恢复目录。

https://www.cndba.cn/hbhe0316/article/4762
https://www.cndba.cn/hbhe0316/article/4762 https://www.cndba.cn/hbhe0316/article/4762
sys@CXMTDB 17:26:37> select file_name,tablespace_name from dba_data_files;

FILE_NAME                       TABLESPACE_NAME
-------------------------------------------------- ------------------------------
/oradata/CXMTDB/system01.dbf               SYSTEM
/oradata/CXMTDB/sysaux01.dbf               SYSAUX
/oradata/CXMTDB/undotbs01.dbf               UNDOTBS1
/oradata/CXMTDB/users01.dbf               USERS
/oradata/CXMTDB/ogg_tbs.dbf               OGG_TBS

1.创建Catalog所需表空间https://www.cndba.cn/hbhe0316/article/4762

https://www.cndba.cn/hbhe0316/article/4762
sys@CXMTDB 17:30:32> create tablespace rman_ts  datafile '/oradata/CXMTDB/rmants.dbf'  size 1024M;

Tablespace created.

2.创建RMAN用户并授权https://www.cndba.cn/hbhe0316/article/4762

sys@CXMTDB 17:30:39> create user rman identified by wwwwww default tablespace rman_ts quota unlimited on rman_ts;

User created.

sys@CXMTDB 17:30:52> grant recovery_catalog_owner to rman;

Grant succeeded.

3.创建恢复目录https://www.cndba.cn/hbhe0316/article/4762

[oracle@node02:/home/oracle]$ rman catalog rman/wwwwww

Recovery Manager: Release 19.0.0.0.0 - Production on Wed Sep 29 17:32:54 2021
Version 19.3.0.0.0

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

connected to recovery catalog database

RMAN> create catalog tablespace rman_ts;

recovery catalog created

RMAN> connect target /;

connected to target database: CXMTDB (DBID=2538411202)

RMAN> register database;

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

4.catalog方式连接
(第一斜杠表示target数据库,catalog表示catalog目录 rman/wwwwww表示catalog用户名和密码)https://www.cndba.cn/hbhe0316/article/4762https://www.cndba.cn/hbhe0316/article/4762

[oracle@node02:/home/oracle]$ rman target / catalog rman/wwwwww

Recovery Manager: Release 19.0.0.0.0 - Production on Wed Sep 29 17:37:46 2021
Version 19.3.0.0.0

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

connected to target database: CXMTDB (DBID=2538411202)
connected to recovery catalog database

版权声明:本文为博主原创文章,未经博主允许不得转载。

oracle,linux

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值