Rename a data file
If the primary database re-commands one or more data files, the modification will not be automatically transmitted to the standby database.
If you want to make standby and data files consistent with primary, you can only manually operate them on your own. Even STANDBY_FILE_MANAGEMENT cannot help, whether it is auto or manual.
The following is an example:
A). Perform the offline -- primary database operation on the tablespace where the renamed data file is located.
SQL> alter tablespace users offline;
Tablespace altered.
B) manually rename the data file (Operating System)-primary database operation
C) use commands to modify the path of data files in the data dictionary and operate the online tablespace-primary database
SQL> alter tablespace users rename datafile '/u01/app/Oracle/oradata/jytest/users01.dbf' to '/u01/app/oracle/oradata/jytest/myusers01.dbf ';
Tablespace altered.
SQL> alter tablespace users online;
Tablespace altered.
SQL>
D) pause the redo application and shutdown -- standby database operations.
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> shutdown immediate;
ORA-01507: database not mounted
E). Manually rename the data file (Operating System)-standby database operations
F). Restart standby and modify the data file path (data dictionary)-standby database operations
SQL> startup mount;
ORACLE instance started.
Total System Global Area 6442450944 bytes
Fixed Size 2030368 bytes
Variable Size 1090520288 bytes
Database Buffers 5335154688 bytes
Redo Buffers 14745600 bytes
Database mounted.
SQL> alter database rename file
2'/u01/app/oracle/oradata/jytest/users01.dbf'
3 '/u01/app/oracle/oradata/jytest/myusers01.dbf ';
Tablespace changed
G). Restart the redo application.
SQL> alter system set standby_file_management = 'manual' scope = both;
System altered.
SQL> alter database rename file '/u01/app/oracle/oradata/jytest/users01.dbf' to '/u01/app/oracle/oradata/jytest/myusers01.dbf ';
Database altered.
SQL> alter system set standby_file_management = 'auto' scope = both;
System altered.
H). switch log-primary database operation
SQL> alter system switch logfile;
The system has been changed.