Wednesday, March 21, 2012

Creating mirror logs in oracle if they are missing mirrlogA mirrlogB

SQL) set lines 1000;
SQL) set pagesize 80;
SQL) select group#,status,member from v$logfile;



GROUP# STATUS MEMBER
-----------------------------------------------------------------------------
1 /oracle/SRD/origlogA/log_g11m1.dbf
1 INVALID /oracle/SRD/mirrlogA/log_g11m2.dbf

2 /oracle/SRD/origlogB/log_g12m1.dbf
2 INVALID /oracle/SRD/mirrlogB/log_g12m2.dbf

3 /oracle/SRD/origlogA/log_g13m1.dbf
3 INVALID /oracle/SRD/mirrlogA/log_g13m2.dbf

4 /oracle/SRD/origlogB/log_g14m1.dbf
4 INVALID /oracle/SRD/mirrlogB/log_g14m2.dbf


The above is the system status we can find with command. Invalid is coming due to that the mirrlog doesn't

exist, there is no file at that location.

We may follow the below procedure:



ALTER DATABASE DROP LOGFILE MEMBER '/oracle/SRD/mirrlogA/log_g11m2.dbf';

ALTER DATABASE ADD LOGFILE MEMBER '/oracle/SRD/mirrlogA/log_g11m2.dbf' to group 1;



ALTER DATABASE DROP LOGFILE MEMBER '/oracle/SRD/mirrlogB/log_g12m2.dbf';

ALTER DATABASE ADD LOGFILE MEMBER '/oracle/SRD/mirrlogB/log_g12m2.dbf' to group 2;



ALTER DATABASE DROP LOGFILE MEMBER '/oracle/SRD/mirrlogA/log_g13m2.dbf';

ALTER DATABASE ADD LOGFILE MEMBER '/oracle/SRD/mirrlogA/log_g13m2.dbf' to group 3;


ALTER DATABASE DROP LOGFILE MEMBER '/oracle/SRD/mirrlogB/log_g14m2.dbf';

ALTER DATABASE ADD LOGFILE MEMBER '/oracle/SRD/mirrlogB/log_g14m2.dbf' to group 4;



If it stills shows invalid under status then give the below command :



alter system switch logfile;



SQL) select group#, status, member from v$logfile;

GROUP# STATUS MEMBER
----------------------------------------------------------------------------
1 /oracle/SRD/origlogA/log_g11m1.dbf
2 /oracle/SRD/origlogB/log_g12m1.dbf
2 INVALID /oracle/SRD/mirrlogB/log_g12m2.dbf
3 /oracle/SRD/origlogA/log_g13m1.dbf
3 INVALID /oracle/SRD/mirrlogA/log_g13m2.dbf
4 /oracle/SRD/origlogB/log_g14m1.dbf
4 INVALID /oracle/SRD/mirrlogB/log_g14m2.dbf

The invalid status will disappear.

For more info; please read SAP Note 491160

5 comments:

kbs training institute said...

thanks for give information.sap ehs online training

Anonymous said...

Thanks for sharing this Informative content. Well explained. Got to learn new things from your Blog on SAP Basis.SAP BASIS Training in Chennai

Mithun said...

Useful Blog SAP Training in Chennai

HANASAPEXPERT said...

Hii , if you are looking best SAP consulting company then denpro technologies is most https://www.denprotech.com/

HANASAPEXPERT said...

Unlock seamless connectivity and optimize business processes with our best-in-class SAP integration services, ensuring efficient data synchronization and real-time insights for enhanced operational excellence.
for more info- https://www.denprotech.com/SAP-3rd-party-integration