Dbvisit tip of the week 8
Replacing the standby controlfiles on the standby server
If for any reason the standby controlfiles have become corrupted or have been accidentally removed on the standby server, Dbvisit can re-create the standby controlfiles from the primary server without any outage on the primary database.
To re-create the standby controlfiles use the dbv_functions -Q option:
dbv_functions -Q w112g Dbvisit Database configuration (DDC) file dbv_w112g.env. =>Replace current standby controfiles on dbvisit52 with new standby controlfile? [No]: yes Starting... Completed. Transferring X.dbvisit.10010921.w112g.standbycontrolfile.ctl to host dbvisit52:X.dbvisit.10010921.w112g.standbycontrolfile.ctl Initiating replacing standby controlfiles on standby server... Dbvisit Database configuration (DDC) file dbv_w112g.env. Completed. Database w112g on dbvisit52 is already down. No action is taken. Completed. Standby controfiles on dbvisit52 replaced.
This command has created a new standby controlfile from the primary database, copied this to the standby server and replaced the existing standby controlfiles with the new copy. It will shutdown and restart the standby database during this process. Running Dbvisit on the standby server will be back to normal with Dbvisit applying the archive logs files as per usual:
dbvisit w112g ============================================================= Dbvisit Standby Database Technology (pid 26054) dbvisit started on dbvisit52 ============================================================= Log file(s) for w112g from dbvisit51 will be applied to dbvisit52... 201006122346 - Log seq 21 thread 1 applied to standby database w112g. Starting Dbvisit Archive Management Module (AMM)... Dbvisit Archive Management Module (AMM) (Number to keep: 0) (Days to keep: 7) (Diskspace full threshold: 80%) Archive log dir: /oracle/app/oracle/oraarch/w112g Total number of archive files : 9 Number of files deleted : 0 Current Disk percent full : 64% ============================================================= dbvisit ended on dbvisit52 =============================================================
The location of the controlfiles for the standby database must be same as the location of the controlfiles for the primary database for the dbv_functions -Q command to work.
For other Dbvisit tips and tricks please see: https://blog.dbvisit.com/category/dbvisit-tips/