Following error occured when try to change backup policies on standby db
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 days; using target database control file instead of recovery catalog RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of configure command at 09/08/2022 08:08:11 RMAN-05021: this configuration cannot be changed for a BACKUP or STANDBY control file;Solution From Primary
Change backup polices as per the requirement
Create standby controlfile and copy to standby database
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 days;
SQL> alter database create standby controlfile as '/tmp/stby.ctl'; Database altered.
Cancel redo apply
Backup exisitng control files and replace newly copied controlfiles from primary
Mount standby database
Change standby file managemnet to manual inorder change datafiles
Rename the datafile names to same as standby datafiles
Change back standby file managemnet to auto
Start redo apply
SQL> alter database recover managed standby database cancel;
cd /u02/oradata/PROD_STBY/controlfile mv control01.ctl control01.ctl_bkp mv control02.ctl control02.ctl_bkp cp /tmp/stby.ctl control01.ctl cp /tmp/stby.ctl control02.ctl
SQL> alter database mount;
alter system set standby_file_management='MANUAL';
SQL> select name from v$datafile; NAME -------------------------------------- /u02/oradata/PROD/datafile/system01.dbf /u02/oradata/PROD/datafile/syaux01.dbf /u02/oradata/PROD/datafile/undo01.dbf /u02/oradata/PROD/datafile/users01.dbf /u02/oradata/PROD/datafile/data01.dbf /u02/oradata/PROD/datafile/index01.dbf
alter database rename file '/u02/oradata/PROD/datafile/system01.dbf' to '/u02/oradata/PROD_STBY/datafile/system01.dbf'; alter database rename file '/u02/oradata/PROD/datafile/syaux01.dbf' to '/u02/oradata/PROD_STBY/datafile/syaux01.dbf'; alter database rename file '/u02/oradata/PROD/datafile/undo01.dbf' to '/u02/oradata/PROD_STBY/datafile/undo01.dbf'; alter database rename file '/u02/oradata/PROD/datafile/users01.dbf' to '/u02/oradata/PROD_STBY/datafile/users01.dbf'; alter database rename file '/u02/oradata/PROD/datafile/data01.dbf' to '/u02/oradata/PROD_STBY/datafile/data01.dbf'; alter database rename file '/u02/oradata/PROD/datafile/index01.dbf' to '/u02/oradata/PROD_STBY/datafile/index01.dbf';
alter system set standby_file_management='AUTO';
SQL> alter database recover managed standby database disconnect from session;
No comments:
Post a Comment