Pages

Friday, May 29, 2020

Unified Rendering Update with TCI for WD ABAP


Procedure :

The Unified Rendering engine is incrementally patched on the ABAP side. When you apply the notes there will be numerous prerequisites. These prerequisites will apply one by one the changes to the ABAP engine. All the notes together will bring the system to the complete and actual stack level.

Implementing the UR notes may take time, and you need to be careful to always activate all the objects listed at the application, otherwise the UR framework can become inconsistent and syntax errors can occur in UR classes.


1. Open the SAP Note : 2090746 and search for the relevant component SAP_BASIS or SAP_UI
2. Open the UR SAP note from the table which is relevant for your SAP_BASIS or SAP_UI release.
3. Download the that relevant UR SAP Note using Transaction SNOTE
4. Upload the relevant TCI using SPAM or SAINT.
5. Now Apply the downloaded UR note to the SAP System.

Post Processing:

1. Once all the notes are applied, make sure that you delete the server and client cache
2. Run report: WDG_MAINTAIN_UR_MIMES.
3. Compare the two values labeled "urchangelist". Both must show the same number.




4. If they do not show the same value, please execute the option 'Deploy Mimes' and check if this resolves the issue.

Note:
Ensure you have full backup of the system, before applying TCI.
Minimum SPAM Version should be 70.

Wednesday, May 27, 2020

Enable X11 Forwarding For AWS EC2 Linux Instance


Procedure :

i. [ec2-user@10-20-3-40 ~]$ xclock
    Warning: Missing charsets in String to FontSet conversion

ii. [ec2-user@10-20-3-40 ~]$ xauth list
    10-20-3-40/unix:12  MIT-MAGIC-COOKIE-1  7e53e7600ff4177d7bbc66bde0a1b1ca
    10-20-3-40/unix:11  MIT-MAGIC-COOKIE-1  e3d1a8915484c929ef3e809b047e6352


iii. [ec2-user@10-20-3-40 ~]$ env | grep DISPLAY
      DISPLAY=localhost:10.0

iv. [ec2-user@10-20-3-40 ~]$ xauth list | grep unix 'echo $DISPLAY | cut -c10-12' > /tmp/xauth
     [ec2-user@10-20-3-40 ~]$ ll /tmp/xauth ; cat /tmp/xauth
     -rw-rw-r-- 1 ec2-user ec2-user 78 Dec  7 14:47 /tmp/xauth

    10-20-3-40/unix:11  MIT-MAGIC-COOKIE-1  e3d1a8915484c929ef3e809b047e6352

v. [ec2-user@10-20-3-40 ~]$ sudo -i
    Last login: Fri Dec  7 14:43:12 UTC 2018 on pts/0


vi. [root@10-20-3-40 ~]$ xauth add 'cat /tmp/xauth'
     [root@10-20-3-40 ~]$ xauth list
     10-20-3-40/unix:11  MIT-MAGIC-COOKIE-1  e3d1a8915484c929ef3e809b047e6352

vi. [root@10-20-3-40 ~]$ env | grep DISPLAY
vii.[root@10-20-3-40 ~]$ export DISPLAY=localhost:11.0


viii.[root@10-20-3-40 ~]$ xclock 
     Warning: Missing charsets in String to FontSet conversion

Note :
After swtiching it from root to any other user please follow the step vi to step viii
[dinh@securehost ~]$ ssh -X ec2-user@ipaddress
Last login: Fri Dec  7 14:41:41 2018 from gw.ca.adm.pythian.com

       __|  __|_  )
       _|  (     /   Amazon Linux AMI
      ___|\___|___|

https://aws.amazon.com/amazon-linux-ami/2018.03-release-notes/
13 package(s) needed for security, out of 16 available
Run "sudo yum update" to apply all updates.

### Test xclock works from ec2-user
[ec2-user@ipaddress ~]$ xclock
Warning: Missing charsets in String to FontSet conversion
^C

### Show all magic cookie
[ec2-user@ipaddress ~]$ xauth list
ipaddress/unix:12  MIT-MAGIC-COOKIE-1  7e53e7600ff4177d7bbc66bde0a1b1ca
ipaddress/unix:11  MIT-MAGIC-COOKIE-1  e3d1a8915484c929ef3e809b047e6352
<strong>ipaddress/unix:10  MIT-MAGIC-COOKIE-1  07b3de3093cef835c19239ea952231b7</strong>

### Show DISPLAY variable
[ec2-user@ipaddress ~]$ env|grep DISPLAY
<strong>DISPLAY=localhost:10.0</strong>

### Create /tmp/xauth based on current DISPLAY variable
[ec2-user@ipaddress ~]$ xauth list | grep unix`echo $DISPLAY | cut -c10-12` > /tmp/xauth
[ec2-user@ipaddress ~]$ ll /tmp/xauth ; cat /tmp/xauth 
-rw-rw-r-- 1 ec2-user ec2-user 78 Dec  7 14:47 /tmp/xauth
<strong>ipaddress/unix:10  MIT-MAGIC-COOKIE-1  07b3de3093cef835c19239ea952231b7</strong>

### Sudo to oracle
[ec2-user@ipaddress ~]$ sudo su - oracle
Last login: Fri Dec  7 14:43:12 UTC 2018 on pts/0

### Add and Verify xauth
[oracle@ipaddress ~]$ xauth add `cat /tmp/xauth`
[oracle@ipaddress ~]$ xauth list
<strong>ipaddress/unix:10  MIT-MAGIC-COOKIE-1  07b3de3093cef835c19239ea952231b7</strong>

### Verify and Add DISPLAY variable
[oracle@ipaddress ~]$ env|grep DISPLAY
[oracle@ipaddress ~]$ export <strong>DISPLAY=localhost:10.0</strong>

### Test xclock works from oracle
[oracle@ipaddress ~]$ xclock
Warning: Missing charsets in String to FontSet conversion
^C
[oracle@ipaddress ~]$ 

### Example of failed xclock
[oracle@ipaddress ~]$ xclock
Error: Can't open display: 
[oracle@ipaddress ~]$ xclock

Friday, May 15, 2020

Create directory path Alias in Linux


Procedure:

Creating alias is the shortcut method or command to change the directory path

The below example is for bash shell


$ cd ~
$ vi .bashrc

# Add the following line in file

alias cdbo="cd /usr/sap/BOP/sap_bobj"

$ source .bash_profile

Then you can run cdbo as a command.

Thursday, May 14, 2020

Configure the SSO based Authentication between Netweaver Portal and ABAP System


Procedure :


1.  Update the system parameter in Instance Profile / Default Profile in RZ10

                      icm/host_name_full = <FQDN>
                      login/accept_sso2_ticket = 1
                      login/create_sso2_ticket = 2


2. Create user in Netweaver Portal and ABAP system with same name and admin authorization

             ABAP:
                    Username : admin
                     Profile : SAP_ALL and SAP_NEW


             Netweaver Portal :
                     Username : admin
                     Assigned Roles : Super Admin , NWA Admin. Content Administrator
                     Assigned Groups: Administrator


3. Download  the system pse of the Portal and ABAP System

          ABAP:
                   Tcode : STRUSTSSO2
                   Download Path:
                   System PSE --> Own Certificate --> Export Certificate -> Save As (base64) ABAP.cert

           Netweaver Portal :
                   Path : NWA --> Configuration --> Security --> Certificates and Keys --> Key Storage (TicketKeyStore)
                   Select SAPLogonTicketKeypair-cert --> Export -->Select Export format (base64) --> Click Download

4. Import the downloaded certificates of ABAP  and Portal

         ABAP :
                 Tcode : STRUSTSSO2
                 Import Path: Certificate --> Import certificate -> Select Certificate (SAPLogonTicketKeypair-cert) --> Add to Certificate list and Add to ACL --> Give Client 000 and SID of Portal --> Save
                 
         Netweaver Portal :
                  Path : NWA --> Configuration --> Security --> Certificates and Keys --> Key Storage (TicketKeyStore)
                   Click Import --> Select 509.X --> Select ABAP.cert --> Import

5. Add ABAP Certificate to Trusted System

         Netweaver Portal :
                 Path : NWA --> Configuration --> Security --> Trusted System --> Add Trusted System --> By Uploading Certificate Manually
                 Import the ABAP Certificate and give the ABAP System Client

6. Create the Backend Entry in System Landcape of Portal

          Netweaver Portal:
                 Path : System Administration --> System Landscape --> System Landscape Overview
               
                Create the Backend System Entry :
   
                 New --> SAP System Using Dedicated Application Server
                 SYSTEM NAME: <SID>CLNT<ClientNO>
                 ADD Alias : <AID>CLNT<ClientNO> --> Finish
             
                 Configure the Backend System :
                 Choose System Alias --> Configure --> Modify Properties


                 Connector
                          Application Host : FQDN of ABAP
                          Gateway Host : FQDN of ABAP
                          Gateway Service : Gateway Service Port of ABAP
                          Logical System Name : <SID>CLNT<ClientNo>
                          SAP Client : ABAP Productive Client
                          SAP System ID (SID) : ABAP SID
                          SAP System Number : ABAP Instance No.
                          Server Port : ABAP Message Server port
                          System Type : SAP_R3

                 Information
                         System Name : <SYSTEM ALIAS>

                 Internet Transaction Server (ITS)
                          ITS Description : ABAP ITS
                          ITS Host Name : <ABAP FQDN>:<ICM PORT>
                          ITS Path : /sap/bc/gui/sap/its/webgui
                          ITS Protocol : http/https

                 User Management
                          Logon Method: SAPLOGONTICKET
                          User Mapping Fields
                          User Mapping Type : admin,user

                 Web Application Server (Web AS)
                          ICM Host Name : <ABAP FQDN>:<ICM PORT>
                          ICM Protocol : http/https
                          ICM URL Prefix : /sap/bc/webdynpro/sap
                          SAP NetWeaver
                          AS Description : ABAP WEB AS

7. Restart the Application Server of ABAP and Portal System.

8. Now login with the admin user created in Step 2 and do the connection test of System Alias.

9. Select the System Alias and Click Established trust and provide the admin user credentials.

10. Test the SSO configuration

                   Netweaver Portal :
                          Path: System Administration --> Support --> Application Integration and Session Management --> Test and Configuration Tools --> Tools (Transaction) --> RUN
                          SYSTEM :  System Alias
                          Transaction : SM59/SM50 --> GO

Rebuild the Oracle 11g DR configuration for SAP using File System Copy


Procedure :

a. Standby Site

      1. Shutdown the database.

                $ su – ora<sid>
                SQL> shutdown immediate;

       2. Delete all files under /oracle/SID/sapdata<n>, /oracle/SID/mirrlog<n>, /oracle/SID/origlog<n>.


b. Primary Site

       3. Begin Backup mode

                SQL> alter database begin backup;

       4. Copy all the under /oracle/SID/sapdata<n>, /oracle/SID/mirrlog<n>, /oracle/SID/origlog<n>.

       5. Create the standby database control file for standby

                SQL> alter database create standby controlfile as '/oracle/<SID>/stdby_control.dbf' reuse;

       6. End Backup Mode

                 SQL> alter database end backup;


c. Standby Site

        7. Start the database in mount

                  SQL> startup mount;

        8. Check the database role

                  SQL> select status,instance_name,database_role,open_mode from v$database,v$Instance;


       
         9. Start the log replication and log apply

                   $ lsnrctl start
                   SQL> alter database recover managed standby database disconnect from session;

         10. Check the logs are getting applied

                   SQL>  select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;

Rebuild the Oracle 11g DR configuration for SAP using RMAN


Procedure :

a. StandBy Site

1. Shutdown the database. 

su – ora<sid>
shutdown immediate;

2. Delete all files under /oracle/SID/sapdata<n>, /oracle/SID/mirrlog<n>, /oracle/SID/origlog<n> 


3. Execute the following command

SQL> startup nomount pfile=/oracle/AB1/11203/dbs/initAB1DR.ora
ORACLE instance started.

Total System Global Area 1.8774E+10 bytes
Fixed Size                  2236128 bytes
Variable Size            9596567840 bytes
Database Buffers         9126805504 bytes
Redo Buffers               48386048 bytes
SQL>

b. Primary Site

4. Execute the following commands

pgpbibpprddc2:oraAB1 17> rman target  sys/sap123@AB1_PRIMARY.WORLD auxiliary sys/sap123@AB1DR_STANDBY.WORLD

Recovery Manager: Release 11.2.0.3.0 - Production on Fri Oct 14 12:35:04 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: AB1 (DBID=2377696196)
connected to auxiliary database: AB1 (not mounted)

RMAN>
run {
allocate channel ch1 type disk;
allocate channel ch2 type disk;
allocate channel ch3 type disk;
allocate channel ch4 type disk;
allocate channel ch5 type disk;
allocate channel ch6 type disk;
allocate channel ch7 type disk;
allocate channel ch8 type disk;
allocate auxiliary channel ch10 type disk;
allocate auxiliary channel ch11 type disk;
allocate auxiliary channel ch12 type disk;
allocate auxiliary channel ch13 type disk;
allocate auxiliary channel ch14 type disk;
allocate auxiliary channel ch15 type disk;
allocate auxiliary channel ch16 type disk;
allocate auxiliary channel ch17 type disk;

duplicate target database for standby from active database DORECOVER NOFILENAMECHECK
spfile
 set db_unique_name='AB1DR'
 set control_files='/oracle/AB1/origlogA/cntrl/cntrlAB1DR.dbf','/oracle/AB1/origlogB/cntrl/cntrlAB1DR.dbf','/oracle/AB1/sapdata1/cntrl/cntrlAB1DR.dbf'
 set log_archive_max_processes='10'
 set fal_client='AB1DR_STANDBY.WORLD'
 set fal_server='AB1_PRIMARY.WORLD'
 set standby_file_management='AUTO'
 set log_archive_config='dg_config=(AB1,AB1DR)'
 set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 10.102.1.168)(PORT =1521))'
 set log_archive_dest_1= 'LOCATION=/oracle/AB1/oraarch/AB1arch MANDATORY Valid_for=(all_logfiles,all_roles) db_unique_name=AB1DR'
 set log_archive_dest_2= 'SERVICE=AB1_PRIMARY.WORLD ARCH VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=AB1'
;
}

Sunday, May 10, 2020

SAP Business Object 4.2 SP8 Installation on Linux with Oracle Part - I


Procedure :


1. OS Pre-requisite Packages for the SAP Business Object for Linux System
  • yum install libstdc++.i686
  • yum install libstdc++.x86_64
  • yum install compat-libstdc++-33.i686
  • yum install compat-libstdc++-33.x86_64 
  • yum install glibc.i686 
  • yum install glibc.x86_64 
  • yum install libX11.i686 
  • yum install libX11.x86_64 
  • yum install libXext.i686 
  • yum install libXext.x86_64 
  • yum install expat.i686 
  • yum install expat.x86_64 
  • yum install libgcc.i686 
  • yum install libgcc.x86_64 
  • yum install libXcursor.i686 
  • yum install libXcursor.x86_64 
  • yum install libXrender.i686 
  • yum install libXrender.x86_64 
  • yum install libXfixes.i686 
  • yum install libXfixes.x86_64 
  • yum install libxcb.i686 
  • yum install libxcb.x86_64 
  • yum install libXau.i686 
  • yum install libXau.x86_64


2. Installation Procedure

a. Start the setup using below command

./setup.sh -InstallDir /usr/sap/BOX





b. Choose the Installer Language as English and Hit Enter.





























c.  Check the Installation folder destination,after the accept the agreement Hit Enter




d. Provide the BO 4.2 Installation key and HIT 2 times Enter

e. Select the Installation type

f.  If you are using database other Sybase SQL anywhere Choose Option 2 , else select the option 1


g. Select the CMS database type


h. Select auditing database

Please follow the link for the BO Installation Part - II



SAP Business Object 4.2 SP8 Installation on Linux with Oracle Part - Il


Procedure :

a. Select the Installtion of Java Web Application Server









b.  If you want to install the Version Management , Please select option 1 else choose 2








c. Provide the SIA hostname and Port













d.  Provide the CMS Port









e. Provide the Administrator User Password and Cluster key for CMS












f.  Provide the Oracle TNS name , database Username and Password. Also Choose 1 to reset the database.












g. Provide the Tomcat Port


h. Provide the WACS and Restful service port

i. Provide the subversion Port and Password.

j. If you want to configure the SMD agent and Introscope , choose the appropriate option. and Enter

k. Installation will begin


l. You will be prompted once the installation is finished

Please follow the link for the BO Installation Part - I

ORA-01111 - name for data file 72 is unknown - rename to correct file


Error : 

Managed Standby Recovery not using Real Time Apply
Media Recovery failed with error 1111
Slave exiting with ORA-283 exception
Errors in file /oracle/ABC/saptrace/diag/rdbms/abcdr/ABCDR/trace/ABCDR_pr00_9668.trc:
ORA-00283: recovery session canceled due to errors
ORA-01111: name for data file 72 is unknown - rename to correct file
ORA-01110: data file 72: '/oracle/ABC/112_64/dbs/UNNAMED00072'
ORA-01157: cannot identify/lock data file 72 - see DBWR trace file
ORA-01111: name for data file 72 is unknown - rename to correct file
ORA-01110: data file 72: '/oracle/ABC/112_64/dbs/UNNAMED00072'

Recovery Slave PR00 previously exited with exception 283

Procedure :

                  Primary
                  a.  select FILE#,NAME from v$datafile where file#=72;             


                  Standby 
                  a.  select * from v$recover_file where error like '%FILE%';
                  b.  alter system set standby_file_management='MANUAL';
                  c.  alter database create datafile '/oracle/ABC/112_64/dbs/UNNAMED00072' as '/oracle/ABC/sapdata<n>/sr3_59/sr3.data62';
                 d.   alter system set standby_file_management='AUTO';
                 e.   alter database recover managed standby database disconnect from session;


Oracle 12c Data Guard configuration for SAP


Procedure :

1. BASIC SETUP AND SETTINGS 

a. Primary Host

a.1. db_name = ABC
a.2. db_unique_name = ABCDC

b. Standby Host

b.1. db_name = ABC
b.2. db_uniquie_name = ABCDR


2.  SETUP ON PRIMARY 

a. Oracle Initialization Parameters to be added  in initABC.ora

*.db_unique_name='ABCDC' 
*.dg_broker_start=TRUE
*.log_archive_dest_1='LOCATION=" /oracle/ABC/oraarch/ABCarch", valid_for=(ONLINE_LOGFILE,ALL_ROLES)'
*.log_archive_dest_state_1='ENABLE' 
*.log_archive_format='%t_%s_%r.dbf' 
*.log_archive_max_processes=2 
*.log_archive_min_succeed_dest=1 
*.log_archive_trace=0 
*.log_file_name_convert='ABC','ABC' 
*.standby_file_management='AUTO
                *.fal_client='abc_primary.world'
                *.fal_server=' '
                *.log_archive_dest_2='service="abc_standby.world"','ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name="abcdr" net_timeout=30','valid_for=(online_logfile,all_roles)'
                *.log_archive_config='dg_config=(ABCDC,ABCDR)'


b. Configuration

b.1. Listener Setting

ADMIN_RESTRICTIONS_LISTENER = on
LISTENER =
  (ADDRESS_LIST =
        (ADDRESS =
          (PROTOCOL = IPC)
          (KEY = ABC.WORLD)
        )
        (ADDRESS=
          (PROTOCOL = IPC)
          (KEY = ABC)
        )
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = hostname)
          (PORT = 1521)
        )
  )
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = ABC)
      (ORACLE_HOME = /oracle/ABC/122)
    )
  (SID_DESC =
        (SID_NAME = ABC)
        (GLOBAL_DBNAME=ABC_DGMGRL)
        (ORACLE_HOME = /oracle/ABC/122)
    )
  )
ADR_BASE_LISTENER = /oracle/ABC/saptrace

c. Tnsnames Settings

ABC_STANDBY.WORLD=
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = DR_hostname)
          (PORT = 1521)
        )
    )
    (CONNECT_DATA =
        (INSTANCE_NAME = ABC)
        (UR=A)
        (SERVICE_NAME = ABC.WORLD)
    )
  )
ABC_PRIMARY.WORLD=
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = DC_hostname)
          (PORT = 1521)
        )
    )
    (CONNECT_DATA =
        (INSTANCE_NAME = ABC)
        (UR=A)
        (SERVICE_NAME = ABC.WORLD)
    )
  )

d. Sqlnet Settings

AUTOMATIC_IPC = ON
TRACE_LEVEL_CLIENT = OFF
NAMES.DEFAULT_DOMAIN = WORLD
# 05.01.06 unsorported parameter now
#NAME.DEFAULT_ZONE = WORLD
# 05.01.06 set the default to 10
SQLNET.EXPIRE_TIME = 10
# 05.01.06 set to default
#TCP.NODELAY=YES
# 05.01.06 set to 32768
DEFAULT_SDU_SIZE=32768
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

3. SETUP ON STANDBY 

a. Oracle Initialization Parameters to be added in initABC.ora

*.db_unique_name='ABCDR' 
*.dg_broker_start=TRUE
*.log_archive_dest_1='LOCATION=" /oracle/ABC/oraarch/ABCarch", valid_for=(ONLINE_LOGFILE,ALL_ROLES)'
*.log_archive_dest_state_1='ENABLE' 
*.log_archive_format='%t_%s_%r.dbf' 
*.log_archive_max_processes=2 
*.log_archive_min_succeed_dest=1 
*.log_archive_trace=0 
*.log_file_name_convert='ABC','ABC' 
*.standby_file_management='AUTO
                *.log_archive_dest_2='location=/oracle/ABC/oraarch/ABCarch','valid_for=(STANDBY_LOGFILE,STANDBY_ROLE)'
                *.fal_client='ABC_STANDBY.WORLD'
                *.fal_server='abc_primary.world'
                *.log_archive_config='dg_config=(ABCDR,ABCDC)'


b. Configuration

b.1. Listener Setting

ADMIN_RESTRICTIONS_LISTENER = on
LISTENER =
  (ADDRESS_LIST =
        (ADDRESS =
          (PROTOCOL = IPC)
          (KEY = ABC.WORLD)
        )
        (ADDRESS=
          (PROTOCOL = IPC)
          (KEY = ABC)
        )
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = hostname)
          (PORT = 1521)
        )
  )
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = ABC)
      (ORACLE_HOME = /oracle/ABC/122)
    )
  (SID_DESC =
        (SID_NAME = ABC)
        (GLOBAL_DBNAME=ABC_DGMGRL)
        (ORACLE_HOME = /oracle/ABC/122)
    )
  )
ADR_BASE_LISTENER = /oracle/ABC/saptrace

c. Tnsnames Settings

ABC.WORLD=
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = hostname)
          (PORT = 1521)
        )
    )
    (CONNECT_DATA =
        (SID = ABC)
        (GLOBAL_NAME = ABC.WORLD)
    )
  )
ABC_STANDBY.WORLD=
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = hostname)
          (PORT = 1521)
        )
    )
    (CONNECT_DATA =
        (INSTANCE_NAME = ABC)
        (UR=A)
        (SERVICE_NAME = ABC.WORLD)
    )
  )
ABC_PRIMARY.WORLD=
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = 10.101.1.196)
          (PORT = 1521)
        )
    )
    (CONNECT_DATA =
        (INSTANCE_NAME = ABC)
        (UR=A)
        (SERVICE_NAME = ABC.WORLD)
    )
  )

d. Sqlnet Settings

AUTOMATIC_IPC = ON
TRACE_LEVEL_CLIENT = OFF
NAMES.DEFAULT_DOMAIN = WORLD
# 05.01.06 unsorported parameter now
#NAME.DEFAULT_ZONE = WORLD
# 05.01.06 set the default to 10
SQLNET.EXPIRE_TIME = 10
# 05.01.06 set to default
#TCP.NODELAY=YES
# 05.01.06 set to 32768
DEFAULT_SDU_SIZE=32768
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

4. COPY PRIMARY DATABASE TO STANDBY SITE

a. Primary Site

a.1. Begin Backup
SQL> alter database begin backup;
a.2. Copy Data Files and Redolog Files
scp -r /oracle/ABC/sapdata* oracle@pgpodrprd:/oracle/ABC/
  scp -r /oracle/ABC/mirrlogA/log* oracle@drprd:/oracle/ABC/mirrlogA scp -r /oracle/ABC/origlogA/log* oracle@drprd:/oracle/ABC/origlogA
                                scp -r /oracle/ABC/mirrlogB/log* oracle@drprd:/oracle/ABC/mirrlogB scp -r /oracle/ABC/origlogB/log* oracle@drprd:/oracle/ABC/origlogB

a.3. End Backup
SQL> alter database end backup;

 Note : Before copying the data from Primary Site to Secondary Site , Shutdown the application                      and database of  Standby Site and clear all the content of /oracle/ABC/sapdata*,                                    /oracle/ABC/mirrlog* , /oracle/ABC/origlog*

a.4  Shutdown the database
SQL>shutdown immediate;

a.5. Create backup Control File.
SQL> create spfile from pfile;
SQL> startup mount;
SQL> alter database create standby controlfile as '/oracle/ABC/stdby_control.dbf' reuse;

a.6. Copy Standby Control File to Standby Host
scp -r /oracle/ABC/stdby_control.dbf oracle@pgpodrprd:/oracle/ABC/ 

a.7. Distributing the Password file to Standby
scp $ORACLE_HOME/dbs/orapwABC oracle@pgpodrprd:$ORACLE_HOME/dbs/orapwABC

a.8. Creating Standby Redolog Files
mkdir /oracle/ABC/standbylog
SQL> alter database add standby logfile '/oracle/ABC/standbylog/srl1.dbf' size 209715200 reuse; 
SQL> alter database add standby logfile '/oracle/ABC/standbylog/srl2.dbf' size 209715200 reuse; 
SQL> alter database add standby logfile '/oracle/ABC/standbylog/srl3.dbf' size 209715200 reuse;
SQL> alter database add standby logfile '/oracle/ABC/standbylog/srl4.dbf' size 209715200 reuse;
SQL> alter database add standby logfile '/oracle/ABC/standbylog/srl5.dbf' size 209715200 reuse;

                 a.9. Opening Primary Database
SQL> alter database open;

b. Standby Site

b.1. Distributing Standby Control File
cd /oracle/ABC
cp stdby_controlf.dbf /oracle/ABC/origlogA/cntrl/cntrlABC.dbf
cp stdby_controlf.dbf /oracle/ABC/origlogB/cntrl/cntrlABC.dbf 
cp stdby_controlf.dbf /oracle/ABC/sapdata1/cntrl/cntrlABC.dbf

b.2. Mounting the Database
SQL> create spfile from pfile;
SQL> startup mount;

b.3. Creating Standby Redolog Files
mkdir /oracle/ABC/standbylog
SQL> alter database add standby logfile '/oracle/ABC/standbylog/srl1.dbf' size 209715200 reuse; 
SQL> alter database add standby logfile '/oracle/ABC/standbylog/srl2.dbf' size 209715200 reuse; 
SQL> alter database add standby logfile '/oracle/ABC/standbylog/srl3.dbf' size 209715200 reuse;
SQL> alter database add standby logfile '/oracle/ABC/standbylog/srl4.dbf' size 209715200 reuse;
SQL> alter database add standby logfile '/oracle/ABC/standbylog/srl5.dbf' size 209715200 reuse;

b.4. Mounting Standby Database
SQL> startup mount;

5. Configurating DataGaurd

a. Primary Site

a.1. Creating the Configuration on Primary
pgpABCrddc1:oracle 51> dgmgrl
DGMGRL> connect sys
DGMGRL> create configuration ABC as primary database is ABCDC connect identifier is ABC_PRIMARY.WORLD;

a.2. Adding the physical Standby Database
DGMGRL> add database ABCDR as connect identifier is ABC_STANDBY.WORLD;
DGMGRL> show configuration

a.3. Overview od DataGuard Properties
DGMGRL> show database ABCDC
DGMGRL> show database verbose ABCDC
DGMGRL> show database ABCDR
DGMGRL> show database verbose ABCDR

a.4. Enable configuration
DGMGRL> enable configuration;

Note: Check Alert.log for both primary and secondary Site for any error.


6. TESTING THE SWITCHOVER 

a.  Primary Site to Secondary Site
DGMGRL> switchover to ABCDR;

b.  Secondary Site to Primary Site
DGMGRL> switchover to ABCDC;