问题
处理方法
RMAN> shutdown
Oracle instance shut down
RMAN>
[oracle@primary1 ~]$ cd $ORACLE_HOME/dbs
[oracle@primary1 dbs]$ ls
hc_racpm1.dat hc_stdg11.dat id_racpm1.dat init.ora initstd.ora orapwstdg11 spfilestdg11.ora
[oracle@primary1 dbs]$ vi initstd.ora
改成与主库一致的数据库名
[oracle@primary1 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 7 09:51:41 2024
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create spfile from pfile ='$ORACLE_HOME/dbs/initstd.ora';
File created.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 7532969984 bytes
Fixed Size 2941920 bytes
Variable Size 1358957600 bytes
Database Buffers 6157238272 bytes
Redo Buffers 13832192 bytes
SQL> show parameter name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cell_offloadgroup_name string
db_file_name_convert string +DATA/STANDBY/DATAFILE/, +DATA
/PRIMARY/DATAFILE/, +DATA/STAN
DBY/TEMPFILE/, +DATA/PRIMARY/T
EMPFILE/
db_name string standby
db_unique_name string primary
global_names boolean FALSE
instance_name string stdg11
lock_name_space string
log_file_name_convert string +DATA/STANDBY/ONLINELOG, +DATA
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
/PRIMARY/ONLINELOG
pdb_file_name_convert string
processor_group_name string
service_names string primary
SQL>
修改后的数据库名与主库保持一致
重新开始恢复控制文件并启动到mount
[oracle@primary1 dbs]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Fri Jun 7 09:54:29 2024
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: STANDBY (not mounted)
RMAN> restore standby controlfile from '/backup/ctl_STANDBY_20240607_8_1';
Starting restore at 07-JUN-24
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=+DATA/PRIMARY/CONTROLFILE/controlfile01.ctl
output file name=+ARCH/PRIMARY/CONTROLFILE/controlfile02.ctl
Finished restore at 07-JUN-24
RMAN>
mount成功