oracle归档模式rman迁移,ORACLE 10G ASM非归档模式下使用RMAN迁移一例

迁移源和目标系统均为AIX系统上的ORACLE 10.2.0.4版本的ASM,系统由生产中心,迁移到数据中心;

非归档

SQL> archive log list;

Database log mode              No Archive Mode

Automatic archival             Disabled

Archive destination            /oracle/product/10.2.0/db/dbs/arch

Oldest online log sequence     194644

Current log sequence           194646

RMAN> show all;

RMAN configuration parameters are:

CONFIGURE RETENTION POLICY TO REDUNDANCY

1;

CONFIGURE BACKUP OPTIMIZATION ON;

CONFIGURE DEFAULT DEVICE TYPE TO DISK;

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT

FOR DEVICE TYPE DISK TO '/orabak/racbak/rac_%d_%t_%U';

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 CHANNEL 1 DEVICE TYPE DISK

MAXPIECESIZE 10 G FORMAT

'/orabak/racbak/rac_%d_%t_%U';

CONFIGURE CHANNEL DEVICE TYPE DISK

MAXPIECESIZE 10 G FORMAT

'/orabak/racbak/rac_%d_%t_%U';

CONFIGURE MAXSETSIZE TO UNLIMITED; #

default

CONFIGURE ENCRYPTION FOR DATABASE OFF; #

default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; #

default

CONFIGURE ARCHIVELOG DELETION POLICY TO

NONE; # default

ecovery Manager: Release 10.2.0.4.0 -

Production on Fri Jun 20 18:28:59 2014

RMAN> run{

2> allocate channel c1 type disk format '/backup/db_t%t_s%s_p%p'

maxpiecesize 2000m;

3> allocate channel c2 type disk format '/backup/db_t%t_s%s_p%p'

maxpiecesize 2000m;

4> allocate channel c3 type disk format '/backup/db_t%t_s%s_p%p' maxpiecesize

2000m;

5> allocate channel c4 type disk format '/backup/db_t%t_s%s_p%p'

maxpiecesize 2000m;

6> backup full database include current controlfile;

7> release channel c1;

8> release channel c2;

9> release channel c3;

10> release channel c4;

11> }

。。。。。。。

channel c2: specifying datafile(s) in backupsetincluding current

control file in backupset

channel c2: starting piece 1 at 20-JUN-14

channel c2: finished piece 1 at 20-JUN-14

piece handle=/backup/db_t850766333_s29_p1 tag=TAG20140620T182905 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:02channel c1:

finished piece 99 at 20-JUN-14

piece handle=/backup/db_t850760950_s25_p99 tag=TAG20140620T182905 comment=NONE

channel c1: starting piece 100 at 20-JUN-14。。。。。。

piece handle=/backup/db_t850760956_s28_p110

tag=TAG20140620T182905 comment=NONE

channel c4: backup set complete, elapsed time: 01:37:17

channel c3: finished piece 111 at 20-JUN-14

piece handle=/backup/db_t850760955_s27_p111 tag=TAG20140620T182905 comment=NONE

channel c3: backup set complete, elapsed time: 01:37:43

Finished backup at 20-JUN-14Starting Control

File and SPFILE Autobackup at 20-JUN-14

released channel: c1

released channel: c2

released channel: c3

released channel: c4

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of Control File and SPFILE Autobackup command on c1 channel

at 06/20/2014 20:06:59

ORA-19504: failed to create file

"/orabak/racbak/auto_c-3221084262-20140620-00"

ORA-27040: file create error, unable to create file

IBM AIX RISC System/6000 Error: 2: No such file or

directory

Recovery Manager complete.

由于CONFIGURE CONTROLFILE AUTOBACKUP FORMAT

FOR DEVICE TYPE DISK TO '/orabak/racbak/rac_%d_%t_%U';

指定的目录'/orabak/racbak/不存在因此Control File and SPFILE Autobackup报错;

但是备份成功完成了,并且备份里包含control file;

备份数据通过HDS  HUR盘阵复制技术传输至远程目标系统;

恢复过程:

SQL> startup nomount pfile='/backup/pfile.ora';

ORACLE instance started.

Total System Global Area 2.2549E+10 bytes

Fixed Size                  2124528 bytes

Variable Size            2164262160 bytes

Database Buffers         2.0368E+10 bytes

Redo Buffers               14651392 bytes

RMAN> SET DBID 4221064232;

executing command: SET DBID

RMAN> RESTORE CONTROLFILE FROM

'/backup/db_t850766333_s29_p1';

Finished restore at 20-JUN-14

SQL> create spfile= '+XXXX/xxxx/spfilexxxx.ora'

from pfile='/backup/pfile.ora';

File created.

SQL> shutdown immediate;

ORA-01507: database not mounted

ORACLE instance shut down.

SQL> exit

SQL> startup nomount;

ORACLE instance started.

Total System Global Area 2.2549E+10 bytes

Fixed Size                  2124528 bytes

Variable Size            2164262160 bytes

Database Buffers         2.0368E+10 bytes

Redo Buffers               14651392 bytes

SQL> show parameter spfile;

NAME                                 TYPE

------------------------------------

----------------------

VALUE

------------------------------

spfile                               string

+XXXX/xxxx/spfilexxxx.ora

SQL> alter database mount;

alter database mount

*

ERROR at line 1:

ORA-00205: error in

identifying control file, check alert log for more info

SQL> alter system set control_files='+XXXX/xxxx/controlfile/current.256.850768855'

scope=spfile;

SQL> shutdown immediate;

ORA-01507: database not mounted

ORACLE instance shut down.

SQL> startup  mount;

ORACLE instance started.

Total System Global Area 2.2549E+10 bytes

Fixed Size                  2124528 bytes

Variable Size            2164262160 bytes

Database Buffers         2.0368E+10 bytes

Redo Buffers               14651392 bytes

Database mounted.

RMAN> run{

2> allocate channel c1 type disk;

allocate channel c2 type disk;

allocate channel c3 type disk;

allocate channel c4 type disk;

restore database;

release channel c1;

3> 4> 5> 6> 7> 8> release channel

c2;

release channel c3;

release channel c4;

}9> 10> 11>

using target database control file instead

of recovery catalog

restoring datafile 00177 to

+DWDG/tjdw/datafile/tjdw_data_155.dbf

restoring datafile 00181 to

+DWDG/tjdw/datafile/tjdw_data_159.dbf

restoring datafile 00185 to

+DWDG/tjdw/datafile/tjdw_data_163.dbf

restoring datafile 00189 to

+DWDG/tjdw/datafile/tjdw_data_167.dbf

channel c3: reading from backup piece

/backup/db_t850760951_s26_p1

ORA-19870: error reading

backup piece /orabak/racbak/rac_TJDW_724253548_0llimerc_1_1

ORA-19505: failed to

identify file "/orabak/racbak/rac_TJDW_724253548_0llimerc_1_1"

ORA-27037: unable to

obtain file status

IBM AIX RISC System/6000

Error: 2: No such file or directory

Additional information: 3

ORA-19870: error reading

backup piece /orabak/racbak/rac_TJDW_724253548_0mlimerc_1_1

ORA-19505: failed to

identify file "/orabak/racbak/rac_TJDW_724253548_0mlimerc_1_1"

ORA-27037: unable to

obtain file status

IBM AIX RISC System/6000

Error: 2: No such file or directory

Additional information: 3

恢复时居然还去找之前过期的备份;

RMAN> crosscheck backup;

RMAN> delete noprompt expired backup;

之后再执行

RMAN> run{

2> allocate channel c1 type disk;

allocate channel c2 type disk;

allocate channel c3 type disk;

allocate channel c4 type disk;

restore database;

release channel c1;

3> 4> 5> 6> 7> 8> release

channel c2;

release channel c3;

release channel c4;

}9> 10> 11>

。。。。。。。。。

channel c2: restored backup piece 105

piece handle=/backup/db_t850760950_s25_p105

tag=TAG20140620T182905

channel c2: restore complete, elapsed time:

00:46:24

Finished restore at 21-JUN-14

恢复成功!

RMAN> recover database noredo;

Starting recover at 21-JUN-14

using channel ORA_DISK_1

Finished recover at 21-JUN-14

RMAN> alter database open resetlogs;

database opened

RMAN> exit

srvctl add database -d XXXX -o

/oracle/product/10.2.0/db

srvctl add instance -d XXXX -i XXXX1 -n YYYY1

srvctl add instance -d XXXX -i XXXX2 -n YYYY2

alter system set local_listener='(ADDRESS =

(PROTOCOL = TCP)(HOST = IP)(PORT = 1521))' sid='XXXX1';

alter system set local_listener='(ADDRESS =

(PROTOCOL = TCP)(HOST = IP)(PORT = 1521))' sid='XXXX2';

修改listener.ora,tnsnames.ora,可以提前先改好。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值