Activating a Physical Standby Database & it's Scenarios

Activating a Physical Standby Database & Its Implementing Scenarios

Activating a physical standby database is typically done in the following scenarios :

  • 1. Disaster recovery : - The primary database is unavailable , and the standby needs to take over as primary.
  • 2. Planned failover : - The primary database is undergoing maintenance, and the standby needs to temporarily or permanently become primary. (It's not needed in a real- time database . )
  • 3. Test Environment : - Activation is performed in a test environment to validate disaster recovery procedures.


Scenario's :-

Scenario 1 : How do you activate physical standby?
Scenario 2 : If the database is restored from the primary backup, how do you activate it?
Scenario 3 : What will happen after the primary backup is restored and is stuck during "ALTER DATABASE OPEN RESETLOGS" ?
Scenario 4 : Before activation, do we encounter the ORA-00349 error?
Scenario 5 : During activation, do you receive a system datafile error?
Scenario 6 : After activating the physical standby database, how do you restore the primary database?
                                                            Implementation

Scenario 01 :-

STEP : 01

First verify it is physical standby or not, If it physical standby database, Then proceed
SQL> select name,open_mode,log_mode,controlfile_type,flashback_on ,database_role from v$database ;

NAME      OPEN_MODE            LOG_MODE     CONTROL FLASHBACK_ON       DATABASE_ROLE
--------- -------------------- ------------ ------- ------------------ ----------------
GANESH MOUNTED              ARCHIVELOG   STANDBY YES                PHYSICAL STANDBY

STEP : 02

Then check the Current SCN of CONTROLFILE HEADER.
SQL> select distinct to_char(checkpoint_change#),checkpoint_time from v$datafile;

TO_CHAR(CHECKPOINT_CHANGE#)              CHECKPOINT_TIME
---------------------------------------- -------------------
7858584847000                            01-11-2024 04:15:20

STEP : 03

Then check the Current SCN of DATAFILE HEADER.
SQL> select distinct to_char(checkpoint_change#),checkpoint_time from v$datafile_header;

TO_CHAR(CHECKPOINT_CHANGE#)              CHECKPOINT_TIME
---------------------------------------- -------------------
7858584847000                            01-11-2024 04:15:20

STEP : 04

If both the CONTROLFILE and datafile header of Current SCN is same, and Fuzzy out put is no rows selected then proceed.
SQL> select fuzzy,file# from v$datafile_header where fuzzy='YES';
no rows selected

STEP : 05

Stop the media recovery process. If it is running.
SQL>  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL ;
Database altered

                                                'OR'

STEP : 05

  • If we are performing manual activation, the FINISH command is used to apply all redo data before activation to minimize data loss.
  • For consistency, it ensures that all available redo logs from the primary database are applied to the standby before it is activated as the new primary.
  • This reduces data loss because the archivelogs shipped from primary to standby may not be applied at the standby site. 
  • If logs are missing, those transactions cannot be recovered.
  • Ensure the standby database is ready and clean, and maintain a consistent state to activate the standby database.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH; 
Database altered

STEP : 06

Then clear the standby redo log file.

SQL> select 'alter database clear logfile group '||GROUP#||';' from v$logfile where type ='STANDBY';
'ALTERDATABASECLEARLOGFILEGROUP'||GROUP#||';'
----------------------------------------------------------------------------
alter database clear logfile group 1;
alter database clear logfile group 2;
alter database clear logfile group 3;
alter database clear logfile group 4;
alter database clear logfile group 5;
SQL>Database altered.

SQL>
Database altered.
SQL>
Database altered.
SQL>
Database altered.
SQL>
Database altered.

In Alert.log file : - 

SERVER:/oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace >tail -50f alert_GANESH.log
alter database clear logfile group 1
Clearing online log 1 of thread 1 sequence number 0
Errors in file /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_ora_21390.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '+GANESH_DB_REDO/Ganesh_DR/onlinelog/group_1.263.962032101'
ORA-11503: ksfdopn:2 Failed to open file +GANESH_DB_REDO/Ganesh_DR/onlinelog/group_1.263.962032101
ORA-15001: diskgroup "GANESH_DB_REDO" does not exist or is not mounted
ORA-15001: diskgroup "GANESH_DB_REDO" does not exist or is not mounted
Errors in file /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_ora_21390.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '+GANESH_DB_REDO/Ganesh_DR/onlinelog/group_1.263.962032101'
ORA-11503: ksfdopn:2 Failed to open file +GANESH_DB_REDO/Ganesh_DR/onlinelog/group_1.263.962032101
ORA-15001: diskgroup "GANESH_DB_REDO" does not exist or is not mounted
ORA-15001: diskgroup "GANESH_DB_REDO" does not exist or is not mounted
WARNING: Cannot delete Oracle managed file +GANESH_DB_REDO/Ganesh_DR/onlinelog/group_1.263.962032101
Completed: alter database clear logfile group 1 

STEP : 07

Then drop the redo log file.

SQL> select ' alter database drop logfile group '||GROUP#||'  ;' from v$logfile where type ='STANDBY';
'ALTERDATABASEDROPLOGFILEGROUP'||GROUP#||';'
------------------------------------------------------------------------------
 alter database drop logfile group 1  ;
 alter database drop logfile group 2  ;
 alter database drop logfile group 3  ;
 alter database drop logfile group 4  ;
 alter database drop logfile group 5  ;
SQL>
SQL>
SQL>
SQL> alter database drop logfile group 1  ;
 alter database drop logfile group 2  ;
 alter database drop logfile group 3  ;
 alter database drop logfile group 4  ;
 alter database drop logfile group 5  ;
Database altered.
SQL>
Database altered.
SQL>
Database altered.
SQL>
Database altered.
SQL>

Database altered.
SQL> select ' alter database drop logfile group '||GROUP#||'  ;' from v$logfile where type ='STANDBY';
no rows selected
SQL> 

 In Alert.log file : - 

SERVER:/oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace >tail -50f alert_GANESH.log
alter database drop logfile group 1
Deleted Oracle managed file +GANESH_DG/Ganesh_DR/onlinelog/group_5.262.1001224163
Completed: alter database drop logfile group 1
 alter database drop logfile group 2
Deleted Oracle managed file +GANESH_DG/Ganesh_DR/onlinelog/group_6.261.1001224163
Completed:  alter database drop logfile group 2
 alter database drop logfile group 3
Deleted Oracle managed file +GANESH_DG/Ganesh_DR/onlinelog/group_1.266.1001224165
Completed:  alter database drop logfile group 3
 alter database drop logfile group 4
Deleted Oracle managed file +GANESH_DG/Ganesh_DR/onlinelog/group_2.265.1001224165
Completed:  alter database drop logfile group 4
 alter database drop logfile group 5
Deleted Oracle managed file +GANESH_DG/Ganesh_DR/onlinelog/group_9.264.1001224165
Completed:  alter database drop logfile group 5 

STEP : 08

After that, check if FLASHBACK_ON is 'YES', then turn off the flashback before activating the physical standby database.

SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
SQL>

SQL> alter database flashback off;
Database altered. 

In Alert.log file : - 

SERVER:/oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace >tail -200f alert_GANESH.log

Fri May 03 09:21:20 2024
ARC2: Becoming the 'no SRL' ARCH
Fri May 03 09:21:22 2024
alter database flashback off
Stopping background process RVWR
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fos42cbd_.flb
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fos42h2q_.flb
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fot1ylvh_.flb
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fot1yq92_.flb
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fot1zjr1_.flb
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fot1zmyb_.flb
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fot1znoh_.flb
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fot20pht_.flb
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fot20q23_.flb
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fot2292n_.flb
Deleted Oracle managed file /flash_back/Ganesh_DR/flashback/o1_mf_fot22ddk_.flb
Flashback Database Disabled
Completed: alter database flashback off 

STEP : 09

After checking the alert_log everything is normal then 'ACTIVATE' the physical standby database.

SQL> alter database activate physical standby database ;
Database altered.

In Alert.log file : - 

SERVER:/oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace >tail -200f alert_GANESH.log

alter database activate physical standby database
ALTER DATABASE ACTIVATE [PHYSICAL] STANDBY DATABASE (GANESH)
Begin: Standby Redo Logfile archival
End: Standby Redo Logfile archival
RESETLOGS after incomplete recovery UNTIL CHANGE 7858584847000                            
krss_find_arc: Selecting ARCe to receive message as last resort
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '+GANESH_DB_REDO/Ganesh_DR/onlinelog/group_3.259.930015951'
ORA-11503: ksfdopn:2 Failed to open file +GANESH_DB_REDO/Ganesh_DR/onlinelog/group_3.259.930015951
ORA-15001: diskgroup "GANESH_DB_REDO" does not exist or is not mounted
ORA-15001: diskgroup "GANESH_DB_REDO" does not exist or is not mounted
ORA-00312: online log 3 thread 1: '+GANESH_DB/Ganesh_DR/onlinelog/group_3.350.921519925'
ORA-11503: ksfdopn:2 Failed to open file +GANESH_DB/Ganesh_DR/onlinelog/group_3.350.921519925
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
Errors in
 /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_ora_21390.trc:
ORA-00313: open failed for members of log group 4 of thread 1
ORA-00312: online log 4 thread 1: '+GANESH_DB_REDO/Ganesh_DR/onlinelog/group_4.260.930015959'
ORA-11503: ksfdopn:2 Failed to open file +GANESH_DB_REDO/Ganesh_DR/onlinelog/group_4.260.930015959
ORA-15001: diskgroup "GANESH_DB_REDO" does not exist or is not mounted
ORA-15001: diskgroup "GANESH_DB_REDO" does not exist or is not mounted
ORA-00312: online log 4 thread 1: '+GANESH_DB/Ganesh_DR/onlinelog/group_4.349.921519921'
ORA-11503: ksfdopn:2 Failed to open file +GANESH_DB/Ganesh_DR/onlinelog/group_4.349.921519921
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
WARNING: Cannot delete Oracle managed file +GANESH_DB/Ganesh_DR/onlinelog/group_4.349.921519921
WARNING: Cannot delete Oracle managed file +GANESH_DB_REDO/Ganesh_DR/onlinelog/group_4.260.930015959
Clearing online redo logfile 4 complete
Resetting resetlogs activation ID 1220299014 (0x10131606)
Online log +GANESH_DG/Ganesh_DR/onlinelog/group_1.264.1001224269: Thread 1 Group 1 was previously cleared
Online log +GANESH_DG/Ganesh_DR/onlinelog/group_2.265.1001224269: Thread 1 Group 2 was previously cleared
Online log +GANESH_DG/Ganesh_DR/onlinelog/group_3.266.1001224269: Thread 1 Group 3 was previously cleared
Online log +GANESH_DG/Ganesh_DR/onlinelog/group_4.261.1001224269: Thread 1 Group 4 was previously cleared
Standby became primary SCN: 1252524241000
Fri May 03 09:21:10 2024
Setting recovery target incarnation to 3
ACTIVATE STANDBY: Complete - Database mounted as primary
Completed: alter database activate physical standby database

STEP : 10

Once the activation is completed successfully, we can open your database to "ARCHIVE" or "NOARCHIVE" mode as per the requirement . During activation, the standby becomes the primary database, and its current SCN also changes.

SQL> alter database noarchivelog ;
Database altered.

SQL> select name,open_mode,log_mode,controlfile_type,flashback_on ,database_role from v$database ;
NAME      OPEN_MODE            LOG_MODE     CONTROL FLASHBACK_ON   DATABASE_ROLE
--------- -------------------- ------------ ------- ------------- ---------------------
GANESH   MOUNTED              NOARCHIVELOG CURRENT NO                 PRIMARY

In Alert.log file : - 

SERVER:/oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace >tail -200f alert_GANESH.log
alter database noarchivelog
Completed: alter database noarchivelog
Fri May 03 09:21:31 2024
ARCe: Archiving disabled
Fri May 03 09:22:11 2024 

STEP : 11

Then OPEN the database with READ-WRITE mode.
SQL> alter database open ;
Database altered.
SQL>
SQL>  select name,open_mode,log_mode,controlfile_type,flashback_on ,database_role from v$database ;

NAME      OPEN_MODE            LOG_MODE     CONTROL FLASHBACK_ON       DATABASE_ROLE
--------- -------------------- ------------ ------- ------------------ ----------------
GANESH   READ WRITE           NOARCHIVELOG CURRENT NO                 PRIMARY
SQL>

In Alert.log file : - 

SERVER:/oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace >tail -200f alert_GANESH.log

alter database open
Fri May 03 09:22:12 2024
Assigning activation ID 1222026321 (0x102e5bb1)
Thread 1 opened at log sequence 1
  Current log# 1 seq# 1 mem# 0: +GANESH_DG/Ganesh_DR/onlinelog/group_1.264.1001224269
Successful open of redo thread 1
MTTR advisory is disabled because either  FAST_START_IO_TARGET or LOG_CHECKPOINT_INTERVAL is set
Fri May 03 09:22:12 2024
SMON: enabling cache recovery
[21390] Successfully onlined Undo Tablespace 1.
Undo initialization finished serial:0 start:1250220112 end:1250221439 diff:661 (6 seconds)
Dictionary check beginning
Fri May 03 09:22:19 2024
Errors in file /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_dbw0_45650.trc:
ORA-01151: cannot identify/lock data file 201 - see DBWR trace file
ORA-01110: data file 201: '+GANESH_DB/GANESH/tempfile/temp.355.914613225'
ORA-11503: ksfdopn:2 Failed to open file +GANESH_DB/GANESH/tempfile/temp.355.914613225
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
Errors in file /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_dbw0_45650.trc:
ORA-01126: file 201 failed verification tests
ORA-01151: cannot identify/lock data file 201 - see DBWR trace file
ORA-01110: data file 201: '+GANESH_DB/GANESH/tempfile/temp.355.914613225'
File 201 not verified due to error ORA-01151
Errors in file /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_dbw0_45650.trc:
ORA-01151: cannot identify/lock data file 202 - see DBWR trace file
ORA-01110: data file 202: '+GANESH_DB/GANESH/tempfile/temp.354.914613223'
ORA-11503: ksfdopn:2 Failed to open file +GANESH_DB/GANESH/tempfile/temp.354.914613223
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
Errors in file /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_dbw0_45650.trc:
ORA-01126: file 202 failed verification tests
ORA-01151: cannot identify/lock data file 202 - see DBWR trace file
ORA-01110: data file 202: '+GANESH_DB/GANESH/tempfile/temp.354.914613223'
File 202 not verified due to error ORA-01151
Errors in file /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_dbw0_45650.trc:
ORA-01151: cannot identify/lock data file 209 - see DBWR trace file
ORA-01110: data file 209: '+GANESH_DB/GANESH/tempfile/temp.353.914613221'
ORA-11503: ksfdopn:2 Failed to open file +GANESH_DB/GANESH/tempfile/temp.353.914613221
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
Errors in file /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_dbw0_45650.trc:
ORA-01126: file 209 failed verification tests
ORA-01151: cannot identify/lock data file 209 - see DBWR trace file
ORA-01110: data file 209: '+GANESH_DB/GANESH/tempfile/temp.353.914613221'
File 209 not verified due to error ORA-01151
Errors in file /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_dbw0_45650.trc:
ORA-01151: cannot identify/lock data file 210 - see DBWR trace file
ORA-01110: data file 210: '+GANESH_DB/GANESH/tempfile/temp.352.914613219'
ORA-11503: ksfdopn:2 Failed to open file +GANESH_DB/GANESH/tempfile/temp.352.914613219
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
ORA-15001: diskgroup "GANESH_DB" does not exist or is not mounted
Errors in file /oracle/orabase/GANESH/diag/rdbms/Ganesh_DR/GANESH/trace/GANESH_dbw0_45650.trc:
ORA-01126: file 210 failed verification tests
ORA-01151: cannot identify/lock data file 210 - see DBWR trace file
ORA-01110: data file 210: '+GANESH_DB/GANESH/tempfile/temp.352.914613219'
File 210 not verified due to error ORA-01151
Dictionary check complete
Verifying file header compatibility for 19c tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Re-creating tempfile +GANESH_DB/GANESH/tempfile/temp.352.914613219 as +GANESH_DG/Ganesh_DR/tempfile/temp.262.1001224939
Fri May 03 09:22:20 2024
ARC2: Archiving disabled
Re-creating tempfile +GANESH_DB/GANESH/tempfile/temp.353.914613221 as +GANESH_DG/Ganesh_DR/tempfile/temp.263.1001224941
Re-creating tempfile +GANESH_DB/GANESH/tempfile/temp.354.914613223 as +GANESH_DG/Ganesh_DR/tempfile/temp.262.1001224941
Re-creating tempfile +GANESH_DB/GANESH/tempfile/temp.355.914613225 as +GANESH_DG/Ganesh_DR/tempfile/temp.261.1001224943
Database Characterset is WE2ISO2259P1
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Fri May 03 09:22:24 2024
QMNC started with pid=61, OS id=24196
LOGSTDBY: Validating controlfile with logical metadata
LOGSTDBY: Validation complete
Completed: alter database open

Scenario 02 :-

If the database is restored from the primary backup, how do you activate it?
  • If you are facing the same error as above, it means:
  • the first datafile and controlfile headers are mismatched .
  • This indicates that your checkpoint value is inconsistent .
  • Therefore, you definitely received different checkpoint and SCN numbers when checking the fuzzy status.
  • You need to check the current sequence and provide the archive logs one by one. 
  • Otherwise, you must check the current file SCN and verify the sequence in the primary database, which will allow you to provide the archive logs accordingly.
  • You can also use the command below:
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL ;
  • After that, run the above command and then provide the archive logs .
  • Once the fuzzy status is clear, open the database using the command below:
SQL> ALTER DATABASE OPEN RESETLOGS ;

Scenario 03 :-

What will happen after the primary backup is restored and is stuck during "ALTER DATABASE OPEN RESETLOGS" ?
  • While getting the above error, check Implementation steps 1 to 8. 
  • After that, if everything is proper, establish a new connection ,
  • Connect to the database, and run "ALTER DATABASE OPEN RESETLOGS ;".
  • If it is stuck, check the alert log after 15-20 minutes. 
  • If there is no update from the alert log, then establish another new session and run the "SHUT ABORT" command.
  • If you drop the online and standby redo logs, after that, we have to drop the online redo log that has an invalid status using the command below. 
select GROUP#,STATUS,MEMBER,TYPE from  v$logfile where TYPE='ONLINE';
select 'alter database clear logfile group '||GROUP#||';' from v$logfile where type ='ONLINE' and status='INVALID';

  • Take the database bounce. After that, clear the REDO LOGS if they are available.
select 'alter database clear  logfile group '||GROUP#||';' from v$logfile where type ='ONLINE' and status='INVALID';

  • After that, open the database using the command below.

select GROUP# ,MEMBERS,STATUS from v$log; 
select GROUP#,STATUS,MEMBER,TYPE from  v$logfile where TYPE='ONLINE';  

  • After that, drop the TEMPFILE; if it is not dropped, then add a new tempfile and drop the old tempfile. 

alter tablespace temp drop tempfile '<TMP_LOCATION>/tmp01.dbf';
alter tablespace temp add tempfile '<TMP_LOCATION>/tmp02.dbf' size 100M; 
ALTER DATABASE OPEN RESETLOGS ;

Scenario 04 :-

Before activation, do we encounter the ORA-00349 error?
  • 'YES', during the clear logfile process, we are encountering the below ORA-00349 error. 
SQL> alter database clear logfile group 1
*
ERROR at line 1:
ORA-00349: failure obtaining block size for '+DG_NAME'
  • This indicates that the DB_FILE_CREATE_DEST parameter does not match those present in the PFILE or SPFILE.
  • Therefore, we need to set the parameter in the PFILE . using below command.
ALTER SYSTEM SET DB_CREATE_FILE_DEST='<PROPER_DESTINATION>' ;
  • After that, we should bounce the database and create one or two redo logs.
SQL> ALTER DATABASE OPEN RESETLOGS;
Scenario 05 :-

During activation, do you receive a system datafile error?
SQL> ALTER DATABASE OPEN RESETLOGS;
ALTER DATABASE OPEN RESETLOGS
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '+DG_GANESH/GANESH/datafile/system.256.45521455'
  • While working as a DBA, many people face the same system datafile error, which means it needs more recovery. 
  • If we need to check that those who file are not recoverable , use the following query:
SQL> SELECT FILE#, ERROR FROM V$RECOVER_FILE WHERE ERROR LIKE '%NOT%';
If we only get the SYSTEM datafile NOT FOUND in that case, we have to forcefully bring up the database using the parameter set in PFILE or SPFILE: 
*._allow_resetlogs_corruption=TRUE - set in pfile
SQL> ALTER SYSTEM SET '_allow_resetlogs_corruption'=TRUE SCOPE = SPFILE; - set in spfile 

  • A "system datafile error" during database startup after a recovery process usually indicates that the system datafile, which stores critical database metadata, is corrupted or damaged preventing the database from fully mounting and opening due to inconsistencies in the information it needs to access. SO above parameter  not recommended.

SQL> ALTER DATABASE OPEN RESETLOGS;
Scenario 06 :-

After activating the physical standby database, how do you restore the primary database ?

After activating the physical standby database, the physical standby database is now a new primary database. So, we have to reconfigure the old primary. After taking a full backup of the new primary database and rebuilding the old primary database as a physical standby database, we then perform a switch-over, allowing the old primary to act as the current primary database.

--------------------------------- Thanks for Reading ----------------------------------

If you face any issues related to database administration, feel free to write down your queries in the comments. I will do my best to resolve your issues and get back to you as soon as possible.

Post a Comment

Comments :

Previous Post Next Post