Tuesday, 6 July 2021

𝗖𝗥𝗘𝗔𝗧𝗜𝗡𝗚 𝗦𝗡𝗔𝗣𝗦𝗛𝗢𝗧 𝗦𝗧𝗔𝗡𝗗𝗕𝗬 𝗗𝗔𝗧𝗔𝗕𝗔𝗦𝗘 𝗜𝗡 𝗘𝗕𝗦 𝗥𝟭𝟮 𝗔𝗡𝗗 𝗔𝗣𝗟𝗟𝗜𝗖𝗔𝗧𝗜𝗢𝗡 𝗦𝗔𝗡𝗜𝗧𝗬 𝗖𝗛𝗘𝗖𝗞..!!

In PRIMARY DB:

SQL> Alter system set log_archive_dest_state_2=DEFER scope=both;

 

In STANDBY DB:

SQL> Alter database recover managed standby database cancel;

 

>> Wait to clear RFS files in progress….!!

SQL> shu immediate;                                                        


SQL> startup mount;


  In DR (Standby):

$ cd $TNS_ADMIN

Change the ifile - ASCPOCI_ascpoci105_ifile.ora entry to open application in DR Instance.

ASCPOCI =

  (DESCRIPTION =

    (ADDRESS_LIST =

#      (ADDRESS = (PROTOCOL = TCP)(HOST = ascpoci25.co.in)(PORT = 1521)) 

      (ADDRESS = (PROTOCOL = TCP)(HOST = ascpoci105.co.in)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SID = ASCPOCI)

    )

  )  


Note:- Primary host is ascpoci25.co.in (To open apps from DR we have to disable it and point to DR host)


In STANDBY DB (DR) Check the following parameters:




At First, Set the both db_recovery_file_dest parameters:









Convert to snapshot standby DB:








v  Now, login to application user.

         $ sqlplus apps/apps  [Use Source apps user password]

  • Run the below command to remove the Source Instance entries.

Note: After execution FND_CONC_CLEAN.SETUP_CLEAN >> COMMIT;
    


v  Run Autoconfig on DBTier  & APPS Tier:-

         $ cd /ascpoci/erp/12.1.0/appsutil/scripts/ASCPOCI_ascpoci105

          [oradev@vm4db DEV_vm4db]$  adautocfg.sh

          Enter the APPS user password:

    



v Start the Application tier.

                 $ cd $ADMIN_SCRIPTS_HOME

                 $ sh adstrtal.sh apps/<apps-password>

                                                      <weblogic-password

 

[ascpociappl@ascpoci105 ~]$ adopmnctl.sh status


You are running adopmnctl.sh version 120.0.12020000.2


Checking status of OPMN managed processes...


Processes in Instance: ASCPOCI_web_ASCPOCI_OHS1

---------------------------------+--------------------+---------+---------

ias-component                    | process-type       |     pid | status

---------------------------------+--------------------+---------+---------

ASCPOCI_web_ASCPOCI   | OHS                |   27620 | Alive



adopmnctl.sh: exiting with status 0

   

APPLICATION SANITY CHECK:

         v  Login as SYSADMIN to Application.

             Go to System administrator -> Concurrent Manager-> Submit a New Request->Single Request.

       



































































     v    Revert back to the Physical Standby database:

          At First, Stop the application service.

          $ cd $ADMIN_SCRIPTS_HOME

          $ adstpall.sh  apps/<apps-password>

                                 <weblogic-password>


   Now, Login to database as sysdba:

 [ascpocidb@ascpoci105 ~]$ sqlplus / as sysdba


 SQL> shu immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.


Total System Global Area 3.7413E+10 bytes

Fixed Size                  2261048 bytes

Variable Size            1.1677E+10 bytes

Database Buffers         2.5636E+10 bytes

Redo Buffers               98385920 bytes

Database mounted.



SQL> alter database convert to physical standby;


Database altered.


SQL> shu immediate;

ORA-01507: database not mounted



ORACLE instance shut down.



SQL> startup mount;

ORACLE instance started.


Total System Global Area 1.0689E+10 bytes

Fixed Size                  2262656 bytes

Variable Size            1577060736 bytes

Database Buffers         9093251072 bytes

Redo Buffers               16900096 bytes

Database mounted.


SQL> select name,open_mode,database_role,protection_mode from v$database;


NAME      OPEN_MODE   DATABASE_ROLE       PROTECTION_MODE

--------- --------------------     -----------------------------  -----------------------------------

ASCPOCI   MOUNTED     PHYSICAL STANDBY  MAXIMUM PERFORMANCE