创建CATALOG数据库快速部署案例

 

一、create catalog directory

2.1 alter tnsnames.ora,add CATADB alisa

[oracle@db1 admin]$ pwd

/u01/app/oracle/product/11.2.0/db_1/network/admin

 

[oracle@db1 admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora# Generated by Oracle configuration tools.

 

ORADB3 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = db1.lhx.oracle.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = oradb3)

    )

  )

 

CATADB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = db1.lhx.oracle.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = CATADB)

    )

  )

 

2.2 create catalog tablespace

SYS@CATADB> create tablespace cat_tbs datafile '/u01/app/oracle/oradata/CATADB/cat_tbs01.dbf' size 100m;

Tablespace created.

2.3 create Catalog administration account and grants

SYS@CATADB> create user catrman identified by oracle

  2  temporary tablespace temp

  3  default tablespace cat_tbs

  4  quota unlimited on cat_tbs;

 

User created.

 

SYS@CATADB> grant recovery_catalog_owner,connect,resource to catrman;

Grant succeeded.

2.4 into RMAN and create catalog and upgrade

[oracle@db1 admin]$ rman

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Dec 20 14:21:41 2018

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

 

RMAN> connect catalog catrman/oracle

connected to recovery catalog database

 

RMAN> create catalog;

recovery catalog created

 

RMAN> upgrade catalog;

recovery catalog owner is CATRMAN

enter UPGRADE CATALOG command again to confirm catalog upgrade

 

RMAN> upgrade catalog;

recovery catalog upgraded to version 11.02.00.04

DBMS_RCVMAN package upgraded to version 11.02.00.04

DBMS_RCVCAT package upgraded to version 11.02.00.04

 

RMAN>

二、Rman Catalog Using

3.1 register database for destination database

[oracle@db1 ~]$ rman target / catalog catrman/oracle@CATADB

 

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Dec 20 14:22:16 2018

 

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

 

connected to target database: ORADB3 (DBID=2731358481)

connected to recovery catalog database

 

RMAN> REGISTER DATABASE;

 

database registered in recovery catalog

starting full resync of recovery catalog

full resync complete

 

 

2.43 RMAN optimizer 

RMAN> CONFIGURE BACKUP OPTIMIZATION ON;

new RMAN configuration parameters:

CONFIGURE BACKUP OPTIMIZATION ON;new RMAN configuration parameters are successfully stored

starting full resync of recovery catalog

full resync complete

 

3.5 START PARALLE 2,

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;

new RMAN configuration parameters:

CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;new RMAN configuration parameters are successfully stored

starting full resync of recovery catalog

full resync complete

 

 

3.7 TEST

[oracle@db1 ~]$ rman target / catalog catrman/oracle@CATADB

 

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Dec 20 14:23:57 2018

 

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

 

connected to target database: ORADB3 (DBID=2731358481)

connected to recovery catalog database

 

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

 

Starting backup at 21-Dec-18

current log archived

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=10 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=11 device type=DISK

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=12 RECID=1 STAMP=955200594

channel ORA_DISK_1: starting piece 1 at 21-Dec-18

channel ORA_DISK_1: finished piece 1 at 21-Dec-18

piece handle=/u01/app/oracle/fast_recovery_area/ORADB3/backupset/2018_12_21/o1_mf_annnn_TAG20170920T132956_dw3z6o5j_.bkp tag=TAG20170920T132956 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 21-Dec-18

 

Starting backup at 21-Dec-18

using channel ORA_DISK_1

using channel ORA_DISK_2

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/oradb3/system01.dbf

input datafile file number=00006 name=/u01/app/oracle/oradata/oradb3/test01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/oradb3/example01.dbf

......

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fashion186

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值