标签:prim structure table online required cancel nec when try
When you rename one or more datafiles in the primary database, the change is not propagated to the standby database. Therefore, if you want to rename the same datafiles on the standby database, you must manually make the equivalent modifications on the standby database because the modifications are not performed automatically, even if the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO.
The following steps describe how to rename a datafile in the primary database and manually propagate the changes to the standby database. If you do not want the standby database to have the same physical structure as the primary database, then these steps are not required.
SQL> ALTER TABLESPACE tbs_4 OFFLINE;
% mv tbs_4.dbf tbs_x.dbf
SQL> ALTER TABLESPACE tbs_4 RENAME DATAFILE ‘tbs_4.dbf‘
2> TO ‘tbs_x.dbf‘;
SQL> ALTER TABLESPACE tbs_4 ONLINE;
SQL> SELECT NAME, SEQUENCE#, ARCHIVED, APPLIED
2> FROM V$ARCHIVED_LOG;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> SHUTDOWN;
% mv tbs_4.dbf tbs_x.dbf
SQL> STARTUP NOMOUNT;
SQL> ALTER DATABASE MOUNT STANDBY DATABASE;
SQL> ALTER DATABASE RENAME FILE ‘tbs_4.dbf‘
2> TO ‘tbs_x.dbf‘;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
2> DISCONNECT FROM SESSION;
If you do not rename the corresponding datafile at the standby site, and then try to refresh the standby database control file, the standby database will attempt to use the renamed datafile, but it will not find it. Consequently, you will see error messages similar to the following in the alert log:
ORA-00283: recovery session canceled due to errors
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: ‘/disk1/oracle/dbs/tbs_x.dbf‘
oracle9204(9i)_dg(data guard)_重命名主库数据文件_指南_转摘官档
标签:prim structure table online required cancel nec when try
原文地址:https://www.cnblogs.com/tomas20/p/13183526.html