Tuesday, 25 August 2020

 

DR Dril switchover and failover for EBS DB and apps

Switchover check

Verify that the target standby is ready for switchover.

Shut down EBS Application on Primary Side..

$ADMIN_SCRIPTS_HOME/

/ebsapps/finptch/inst/apps/FINPTCH_kelserpopapt06/admin/scripts

./adstpall.sh apps/ apps password

Preparing for switchover to standby server

1. Verify the primary database instance is open and standby database instance is mounted.

2. Verify there are no active users connected to the database. Shut down all the sessions in the primary database.

3. Ensure that the last redo data transmitted from the primary database was applied on the standby database. Issue the following SQL command on the primary and standby databases to find out. If necessary, perform a log file switch before the first command.

SQL>select sequence#,applied from v$archived_log;

4. Check whether the primary is ready for switch. Query the switchover_status column of the v$database fixed view to determine whether the database is ready to switch modes.

SQL>select switchover_status from v$database;

If this query returns "TO STANDBY", then the environment is ready to switch. If it returns "ACTIVE SESSIONS", then the switch command should be used with the 'session shutdown' option.

Initiate the switchover on the primary database

5. Switch over the current production database(172.23.*.*) to the standby database.

SQL>ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY WITH SESSION SHUTDOWN;

After complete this command DB is going to Down.

Need to start DB in mount Status..

SQL> startup mount;

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Total System Global Area 4.2950E+10 bytes

Fixed Size 4508576 bytes

Variable Size 6979322976 bytes

Database Buffers 3.5836E+10 bytes

Redo Buffers 129708032 bytes

Database mounted.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

Database altered.

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS

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

TO PRIMARY

SQL>

Run On Primary DB ( 172.23.*.* )

alter system set log_archive_dest_state_3='defer' scope=both;

6. Convert the former Standby database(172.23.1*.*) to a Primary (Production) database.

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

7.Now open New Primary (earlier it was standby) database(172.23.1*.*):

SQL> ALTER DATABASE OPEN;

ALTER SYSTEM SWITCH LOGFILE;

8. Check the DB sync is happening or not.

172.23.1*.*

==========

select thread#, max(sequence#) "Last Primary Seq Generated" from v$archived_log where first_time between (sysdate-7) and (sysdate+1) group by thread# order by 1;

select thread#, max(sequence#) "Last Standby Seq Received" from v$archived_log val, v$database vdb where val.resetlogs_change# = vdb.resetlogs_change# group by thread# order by 1;

Complete the database configurations

1. Connect to the new primary database using SQL*Plus as user APPS, and execute the following commands:

SQL>exec fnd_net_services.remove_system('<SID>'); SQL>commit; SQL>exec fnd_conc_clone.setup_clean ;

2. As the oracle user on the new primary database server, use AutoConfig to complete configuration for primary operations, providing the APPS password when prompted:

$ cd <RDBMS_ORACLE_HOME>/appsutil/scripts/<context> $ ./adautocfg.sh

When run the adautocfg get the error.

Check in screen short.

Fix the error

Solution..

SQL> create temporary tablespace temp1 tempfile '+FINSIT/FINPTCH_DR/TEMPFILE/temp01.dbf' size 10G;

Tablespace created.

SQL> alter database default temporary tablespace temp1;

Database altered.

SQL> drop tablespace temp including contents and datafiles;

Tablespace dropped.

SQL> select NAME,STATUS from v$tempfile;

Configuring Application Tiers After Role Transition (switchover, failover)

First Time Need to create context file..

perl adcfgclone.pl appsTier

[ NON-PROD applsit@apps node

 /ebsapps/finsit/finptch/apps/apps_st/comn/clone/bin]$ perl adcfgclone.pl appsTier

Copyright (c) 2002 Oracle Corporation

Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adcfgclone Version 120.31.12010000.14

Enter the APPS password :

Running:

/ebsapps/finsit/finptch/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -cp /ebsapps/finsit/finptch/apps/apps_st/comn/clone/jlib/java:/ebsapps/finsit/finptch/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/ebsapps/finsit/finptch/apps/apps_st/comn/clone/jlib/ojdbc14.jar oracle.apps.ad.context.CloneContext -e /ebsapps/finsit/finptch/apps/apps_st/comn/clone/bin/../context/apps/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_27070.lst -stage /ebsapps/finsit/finptch/apps/apps_st/comn/clone 2> /tmp/adcfgclone_27070.err; echo $? > /tmp/adcfgclone_27070.res

Log file located at /ebsapps/finsit/finptch/apps/apps_st/comn/clone/bin/CloneContext_0720134021.log

Provide the values required for creation of the new APPL_TOP Context file.

Target System Hostname (virtual or normal) [apps node] :

Target System Domain Name : airtel.africa

Target System Database SID : FINPTCH

Target System Database Server Node [apps node] : db hostname

Target System Database Domain Name [airtel.africa] :

Target System Base Directory : /ebsapps/finsit/finptch/

Target System Tools ORACLE_HOME Directory [/ebsapps/finsit/finptch/apps/tech_st/10.1.2] :

Target System Web ORACLE_HOME Directory [/ebsapps/finsit/finptch/apps/tech_st/10.1.3] :

Target System APPL_TOP Directory [/ebsapps/finsit/finptch/apps/apps_st/appl] :

Target System COMMON_TOP Directory [/ebsapps/finsit/finptch/apps/apps_st/comn] :

Target System Instance Home Directory [/ebsapps/finsit/finptch/inst] :

Target System Root Service [enabled] :

Target System Web Entry Point Services [enabled] :

Target System Web Application Services [enabled] :

Target System Batch Processing Services [disabled] : enabled

Target System Other Services [enabled] :

Do you want to preserve the Display [kelpaaerpapt01:0.0] (y/n) : n

Target System Display [kelserpopapt07:0.0] : 0.0

RC-00217: Warning: Configuration home directory (s_config_home) evaluates to /ebsapps/finsit/finptch/inst/apps/FINPTCH_apps_node. A directory with this name already exists and is not empty.

Do you want to continue (y/n) : y

Do you want the the target system to have the same port values as the source system (y/n) [y] ? : n

Target System Port Pool [0-99] : 4

Checking the port pool 4

done: Port Pool 4 is free

Report file located at /ebsapps/finsit/finptch/inst/apps/FINPTCH_apps_node/temp/portpool.lst

Complete port information available at /ebsapps/finsit/finptch/inst/apps/FINPTCH_apps_node/temp/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /oracle_home/app/12.1.0/orahome/appsutil/outbound/FINPTCH_db_node

2. /inst_top/asiprod/apps/FINPTCH_cpnqerpaapzp11/appltmp

3. /usr/tmp

4. /oracle/tmp/erp/p2ptat

Choose a value which will be set as APPLPTMP value on the target node [1] : 3

APPS Password : Log file located at /ebsapps/finsit/finptch/inst/apps/FINPTCH_apps_node/admin/log/ApplyAppsTier_07201344.log

| 73% completed

Completed Apply...

Mon Jul 20 13:50:11 2020

Do you want to startup the Application Services for FINPTCH? (y/n) [y] :

Starting application Services for FINPTCH:

Running:

After Start the application verify login page is coming our not.

Check Concurrent Status through

cmstatus.sql

SQL> select node_name,target_node,control_code from fnd_concurrent_queues;

SQL> update apps.fnd_concurrent_queues set node_name = 'New Node Name';

SQL> select NODE_NAME,NODE_MODE,STATUS from fnd_nodes;

SQL> update fnd_concurrent_queues set TARGET_NODE='New Node Name';

SQL> Commit;

Finish Oracle E-Business Suite configuration on application tiers

 

No comments:

Post a Comment