设为首页 加入收藏

TOP

rman对特定表空间迁移技术(一)
2014-11-24 08:07:11 来源: 作者: 【 】 浏览:15
Tags:rman 特定 空间 迁移 技术

今天是2014-01-13,今天收到朋友一条qq消息,说是看一下备份数据迁移问题。

问题描述:

生产有两个库A和B,A库是生产库,B库为测试库,且A库有3个表空间1,2,3,且只有1表空间为生产表空间数据量较小,其他两个表空间为测试且数据量非常大。当A库突然宕机,需要通过之前备份将A库的1表空间及时恢复到B库,以此来担任业务,为了尽快恢复数据,需要把2和3表空间排除掉,技术需要采用rman。

解决方案:

哈哈。我第一次听到这么样的情景,因为这种情况完全可以通过dg来解决此问题,另外对于该问题还可以使用expdp和impdp以及传输表空间技术来实现。

本例只是为了帮他测试,使用rman技术来完成此需求。

操作步骤:

[oracle@oracle-one ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Mon Jan 13 09:53:02 2014

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

connected to target database: RHYS (DBID=2745484551)

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name RHYS are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 7;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE ON;
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_RHYS.f'; # default

RMAN> configure controlfile autobackup on
2> ;

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored


RMAN> backup database plus archivelog delete input;


Starting backup at 13-JAN-14
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=45 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=32 RECID=38 STAMP=835887568
input archived log thread=1 sequence=33 RECID=43 STAMP=835983664
input archived log thread=1 sequence=34 RECID=41 STAMP=835983651
input archived log thread=1 sequence=35 RECID=42 STAMP=835983661
channel ORA_DISK_1: starting piece 1 at 13-JAN-14
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 01/13/2014 09:55:25
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open

RMAN> host;

[oracle@oracle-one ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 13 09:58:08 2014

Copyright (c) 1982, 2013, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> alter system set wallet open identified by "Amy";

System altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic St

首页 上一页 1 2 3 4 5 6 7 下一页 尾页 1/8/8
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇MongoDB学习笔记(六)MongoDB索引.. 下一篇PostgreSQL DBLink的使用

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·微服务 Spring Boot (2025-12-26 18:20:10)
·如何调整 Redis 内存 (2025-12-26 18:20:07)
·MySQL 数据类型:从 (2025-12-26 18:20:03)
·Linux Shell脚本教程 (2025-12-26 17:51:10)
·Qt教程,Qt5编程入门 (2025-12-26 17:51:07)