This article describes steps which are necessary, if you wish to move datafiles in your primary database in Dbvisit Standby environment.
Problem Details
Problem Statement
Renaming or Moving Datafiles in Dbvisit Standby Environment
Applicable Error Code
Log Apply Fails
Affected Versions
All Versions (But we discuss Version 8 in this article)
Affected Platforms
Platform independent
Description
Once you move datafiles in your primary database, then you also need to adjust your standby database. If you do not do it, then you will not be able to apply shipped logs due to mismatch of file locations between your primary and standby in controlfiles. You have basically 2 options how to get the standby running again:
Solution
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
Now rename all the datafiles at the standby site using mv command (for Windows just use the usual method):
$ mv <old_path>/file01.dbf <new_path>/file01.dbf
After you rename all the files with mv command, run via sqlplus (do this for all files):
SQL> ALTER DATABASE RENAME FILE ' <old_path>/file01.dbf' TO '<new_path>/file01.dbf';
After you finish, simply exit sqlplus and restart the standby database with dbvctl command:
dbvctl -d <ddc> -D start|stop
That's it - now you should be able to send & apply the archive log files again.
Comments