oracle12c pdb迁移,Oracle12c cdb和pdb备份恢复

由于12c有CDB和PDB的概念。rman在备份使用上会有点区别。

备份:

1.备份全部的数据库(包括CDB)

[oracle@ora12c ~]$ rman target / Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 14:42:27 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database: ORADBCA (DBID=261209273) RMAN> BACKUP DATABASE;

2.只备份CDB

[oracle@ora12c ~]$ rman target / Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 14:46:10 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database: ORADBCA (DBID=261209273) RMAN> BACKUP DATABASE ROOT;

3.只备份PDB(一个或多个)

单个CDB备份:

[oracle@ora12c ~]$ rman target=sys/oracle@pdb1 Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 14:48:00 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database: ORADBCA (DBID=261209273) RMAN> BACKUP DATABASE;

或者

[oracle@ora12c ~]$ rman target / Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 14:48:46 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database: ORADBCA (DBID=261209273) RMAN> BACKUP PLUGGABLE DATABASE pdb1;

多个CDB备份:

[oracle@ora12c ~]$ rman target / Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 14:49:29 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database: ORADBCA (DBID=261209273) RMAN> BACKUP PLUGGABLE DATABASE pdb1,pdb2;

4.只备份其中的某一个表空间

这个和原来的没啥区别,只需要rman登入要备份那个数据库就行了。

[oracle@ora12c ~]$ rman target=sys/oracle@pdb1 Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 14:53:54 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database: ORADBCA (DBID=261209273) RMAN> BACKUP TABLESPACE users;

还原:

1.全部数据库还原

[oracle@ora12c ~]$ rman target / Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 15:11:23 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database: ORADBCA (DBID=261209273) RMAN> run 2> { 3> startup mount; 4> restore database; 5> recover database; 6> alter database open; 7> }

2.只CDB还原

[oracle@ora12c ~]$ rman target / Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 15:12:41 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database: ORADBCA (DBID=261209273) RMAN> run 2> { 3> startup mount; 4> restore database root; 5> recover database root; 6> alter database open; 7> }

3.只PDB还原(一个或者多个)

[oracle@ora12c ~]$ rman target / Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 15:20:14 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database: ORADBCA (DBID=261209273) RMAN> run 2> { 3> alter pluggable database pdb1, pdb2 close; 4> restore pluggable database pdb1, pdb2; 5> recover pluggable database pdb1, pdb2; 6> alterpluggable database pdb1, pdb2 open; 7> }

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值