2.原主库
1)切换到mount
2)直接进行restore
3)recover 到204292
recover database until scn 204292; 《〈《这步如果能正常实现(会自动restore后并应用归档)
RMAN> recover database until scn 204292;
Starting recover at 25-NOV-23
using channel ORA_DISK_1
starting media recovery
archived log for thread 2 with sequence 12 is already on disk as file +ARCH/yldbp/archivelog/2023_11_25/thread_2_seq_12.1101.1153853905
archived log for thread 2 with sequence 13 is already on disk as file +ARCH/yldbp/archivelog/2023_11_25/thread_2_seq_13.1100.1153853905
archived log for thread 2 with sequence 14 is already on disk as file +ARCH/yldbp/archivelog/2023_11_25/thread_2_seq_14.1379.1153853905
archived log for thread 2 with sequence 15 is already on disk as file +ARCH/yldbp/archivelog/2023_11_25/thread_2_seq_15.1378.1153853907
archived log for thread 2 with sequence 16 is already on disk as file +ARCH/yldbp/archivelog/2023_11_25/thread_2_seq_16.1399.1153853995
archived log file name=+ARCH/yldbp/archivelog/2023_11_25/thread_2_seq_12.1101.1153853905 thread=2 sequence=12
archived log file name=+ARCH/yldbp/archivelog/2023_11_25/thread_2_seq_13.1100.1153853905 thread=2 sequence=13
archived log file name=+ARCH/yldbp/archivelog/2023_11_25/thread_2_seq_14.1379.1153853905 thread=2 sequence=14
archived log file name=+ARCH/yldbp/archivelog/2023_11_25/thread_2_seq_15.1378.1153853907 thread=2 sequence=15
archived log file name=+ARCH/yldbp/archivelog/2023_11_25/thread_2_seq_16.1399.1153853995 thread=2 sequence=16
media recovery complete, elapsed time: 00:00:00
Finished recover at 25-NOV-23
RMAN> exit
4)将原主库转换为备库
ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
5)启动mount
6)开启复制进程
recover managed standby database using current logfile disconnect from session;
alert会看到复制进程异常退出
Sat Nov 25 19:12:11 2023
Managed Standby Recovery starting Real Time Apply
MRP0: Background Media Recovery terminated with error 38868
Errors in file /u01/app/oracle/diag/rdbms/yldbp/yldbp2/trace/yldbp2_mrp0_13535.trc:
ORA-38868: warning: the control file may have incorrect data file structure
Managed Standby Recovery not using Real Time Apply
MRP0: Background Media Recovery process shutdown (yldbp2) 《〈《
7)新备库重新关闭并mount后就正常