RMAN 迁移ASM到异机文件系统实战
环境说明:
源库:192.168.0.10
目标库:192.168.0.11
源库备份:
RMAN> run {
2> allocate channel c1 device type disk;
3> allocate channel c2 device type disk;
4> backup database format '/home/Oracle/full_database%U' include current controlfile;
5> sql 'alter system archive log current';
6> backup archivelog all format '/home/oracle/archivelog_%U';
7> crosscheck backup;
8> delete noprompt obsolete;
9> release channel c1;
10> release channel c2;
11> }
复制备份集到备库:
scp /home/oracle/full* [email protected]:/home/oracle/target_bk/
scp /home/oracle/archive* [email protected]:/home/oracle/target_bk/
[oracle@targetdb target_bk]$ ls
archivelog_0rnu4jbf_1_1 full_database0nnu4ja0_1_1 full_database0pnu4jb4_1_1
archivelog_0snu4jbf_1_1 full_database0onu4ja0_1_1 full_database0qnu4jb5_1_1
目标库操作
[oracle@targetdb sourcedb]$ mkdir {a,b,c,u}dump
[oracle@targetdb sourcedb]$ ls
adump bdump cdump udump
[oracle@targetdb oradata]$ mkdir sourcedb
[oracle@targetdb oradata]$ ls
sourcedb
[oracle@targetdb oradata]$ cd sourcedb/
[oracle@targetdb sourcedb]$ mkdir arch
[oracle@targetdb sourcedb]$ ls
arch
开始恢复:
因为还没有参数文件,先使用rman 无参数启动
export ORACLE_SID=sourcedb
RMAN> startup nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/oracle/product/10.2.0/dbs/initsourcedb.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 1218268 bytes
Variable Size 54528292 bytes
Database Buffers 100663296 bytes
Redo Buffers 2973696 bytes
RMAN> exit
Recovery Manager complete.