We're here to help!

Renaming / Moving Datafiles in Dbvisit Standby Environment


Read our docs 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



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:

1) Re-create the standby database
This one is the easiest, because no manual action is required. On the other hand, if your primary database is big and transfer of files would take too long due to slow network, then this would not be a good option.
This is well described procedure in documentation, so no more details for this method will be provided in this document.
2) Modify the file paths in standby database
This requires lot of manual work, but no standby DB recreation is needed. Provided you still have the archive logs on primary to fill in the archive log gap !!! To proceed with this option do the following steps on standby site:
NOTE: These steps assume, that controlfile was not moved, if you moved also controlfile, you need to modify also the control_files parameter in spfile.

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.




Have more questions? Submit a request