Search This Blog

Tuesday, March 10, 2020

SUM DMO table comparision checksum error



While using SUM DMO for SAP system migration, DMO compares tables within the process of migration. Irrespectof you chose the table compariso option, it compares the tables within the execution phase and it's going to result with checksum errors.

This article provides us the  procedure to investigate and fix table comparison row count checksum error

Check the log file MIGRATE_DT_CHECKDIFF.LST which exists under the SUM log file location.

Change to the SUM log directoy

more MIGRATE_DT_CHECKDIFF.LST




BALDAT and BALHDR are the 2 tables which got checksum errors.

Proceeded as below
/usr/sap//SUM/abap/load/migrate_dt]# grep -i BALDAT *

MIGRATE_DT_CHECKDIFF.LST:BALDAT # old: 14156352 new: 14156348

MIGRATE_DT_CNT_00003_BALDAT_EXP.IN:cp "BALDAT"

MIGRATE_DT_CNT_00003_BALDAT_EXP.LOG:2 ETQ399 Counted 1 tables out of 1, written to '/usr/sap//SUM/abap/load/migrate_dt/MIGRATE_DT_CNT_00003_BALDAT_EXP.OUT'.
MIGRATE_DT_CNT_00003_BALDAT_EXP.OUT:BALDAT 14156352
MIGRATE_DT_CNT_00003_BALDAT.FLAG:# Export for bucket 00003_BALDAT finished at 2019/07/29 14:18:32.

MIGRATE_DT_CNT_00003_BALDAT.FLAG:"MIGRATE_DT_CNT_00003_BALDAT_EXP.OUT";16

MIGRATE_DT_CNT_00003_BALDAT_IMP.IN:cp "BALDAT" "BALDAT"
MIGRATE_DT_CNT_00003_BALDAT_IMP.OUT:BALDAT 14156348
MIGRATE_DT_CNT.BUC:count: refid=00003_BALDAT export=MIGRATE_DT_CNT_00003_BALDAT_EXP.IN import=MIGRATE_DT_CNT_00003_BALDAT_IMP.IN size=8897208 estruntime=8689 expntasks=1 impntasks=1

·   Replace 14156352 with 14156348 in file MIGRATE_DT_CNT_00003_BALDAT_IMP.OUT.

·       Before editing this file, take a copy of existing one.

[root@/usr/sap//SUM/abap/load/migrate_dt]# cp -p MIGRATE_DT_CNT_00003_BALDAT_IMP.OUT MIGRATE_DT_CNT_00003_BALDAT_IMP.OUT_ORIG



Just checking if the copy has been created

[root@/usr/sap//SUM/abap/load/migrate_dt]# ls -lart MIGRATE_DT_CNT_00003_BALDAT_IMP*

-rw-r--r-- 1 adm sapsys 21 Jul 29 14:18 MIGRATE_DT_CNT_00003_BALDAT_IMP.IN

-rw-r--r-- 1 adm sapsys 16 Jul 29 18:19 MIGRATE_DT_CNT_00003_BALDAT_IMP.OUT_ORIG

-rw-r--r-- 1 adm sapsys 16 Jul 29 18:19 MIGRATE_DT_CNT_00003_BALDAT_IMP.OUT

[root@/usr/sap//SUM/abap/load/migrate_dt]#



Now Edit the file

[root@/usr/sap//SUM/abap/load/migrate_dt]# vi MIGRATE_DT_CNT_00003_BALDAT_IMP.OUT



Content of the file











Changing it to 14156352













Save and exit

[root@/usr/sap//SUM/abap/load/migrate_dt]# cat MIGRATE_DT_CNT_00003_BALDAT_IMP.OUT

BALDAT 14156352

[root@/usr/sap//SUM/abap/load/migrate_dt]#



Now allow us to check if BALDAT checksum error is fixed by retrying the phase.

It should show checksum error only for BALHDR


[root@<hostname>/usr/sap/<SAPSID>/SUM/abap/load/migrate_dt]# view /usr/sap/<SAPSID>/SUM/abap/load/migrate_dt/MIGRATE_DT_CHECKDIFF.LST

It is showing BALHDR only














[root@<hostname>/usr/sap/<SAPSID>/SUM/abap/load/migrate_dt]# grep -i BALHDR MIGRATE_DT_CNT*
MIGRATE_DT_CNT_00038_EXP.IN:cp "BALHDRP"
MIGRATE_DT_CNT_00038_EXP.OUT:BALHDRP 0
MIGRATE_DT_CNT_00038_IMP.IN:cp "BALHDRP" "BALHDRP"
MIGRATE_DT_CNT_00038_IMP.OUT:BALHDRP 0
MIGRATE_DT_CNT_00134_EXP.IN:cp "BALHDR"
MIGRATE_DT_CNT_00134_EXP.OUT:BALHDR 2323031
MIGRATE_DT_CNT_00134_IMP.IN:cp "BALHDR" "BALHDR"
MIGRATE_DT_CNT_00134_IMP.OUT:#BALHDR 2323030
MIGRATE_DT_CNT_00134_IMP.OUT:BALHDR 2323030

Edit file MIGRATE_DT_CNT_00134_EXP.OUT replacing 2323031 with 2323030

[root@<hostname>/usr/sap/<SAPSID>/SUM/abap/load/migrate_dt]# cp -p MIGRATE_DT_CNT_00134_EXP.OUT MIGRATE_DT_CNT_00134_EXP.OUT_ORIG

[root@<hostname>/usr/sap/<SAPSID>/SUM/abap/load/migrate_dt]# ls -lart MIGRATE_DT_CNT_00134_EXP*
-rw-r--r-- 1 <SAPSID>adm sapsys 442 Jul 29 14:18 MIGRATE_DT_CNT_00134_EXP.IN
-rw-r--r-- 1 <SAPSID>adm sapsys 374 Jul 29 14:19 MIGRATE_DT_CNT_00134_EXP.OUT_ORIG
-rw-r--r-- 1 <SAPSID>adm sapsys 374 Jul 29 14:19 MIGRATE_DT_CNT_00134_EXP.OUT
[root@<hostname>/usr/sap/<SAPSID>/SUM/abap/load/migrate_dt]#

[root@<hostname>/usr/sap/<SAPSID>/SUM/abap/load/migrate_dt]# vi MIGRATE_DT_CNT_00134_EXP.OUT






















Replacing 2323031 with 2323030























Save and exit
[root@<hostname>/usr/sap/<SAPSID>/SUM/abap/load/migrate_dt]# cat MIGRATE_DT_CNT_00134_EXP.OUT
BALHDR 2323030
CNVLTRL_PORTION 0
ITS_POS 0
RSDRCRM_SEG_TEST 0
TBE32T 1
/BOFU/DPPFCNTR 0
CME_ST_R3_ATTRH 0
IUUC_2RX_ALP 0
RSCNV_BUFFER_CHA 0
TDBSELVER 0
/BCV/C_CONF_XC 0
CNVLTRL_PAR_JOBS 0
ITS_SHOW 0
RSDRCRM_SEG_QSI 0
TBE34 0
/BOFU/DO_CUST 0
CME_ST_R3_DEP 0
IUUC_2RX_ACCR 0
RSCNV_BUFFER_MAP 0
TDATS 0
/BCV/C_DASHBA 48
CNVLTRL_PARAM 0
ITS_STYLES 0
RSDRCRM_SEG_PARA 0
TBEPRI 0
[root@<hostname>/usr/sap/<SAPSID>/SUM/abap/load/migrate_dt]#

Retry the phase now














It has passed the error.











Monday, March 9, 2020

Procedure of updating oracle parameters in spfile



Oracle has two parameter files from which it reads while it's beginning .

They are spfile &#40;server parameter file&#41; and pfile &#40;parameter file&#41;. Spfile is binary format file where manual changes are not allowed.
Below document shows us the procedure on the way to change/update the oracle parameters in spfile.

This procedure is on linux operating system.



Take a backup of pfile and spfile







Create pfile from spfile
























Make the changes to the pfile by editing the file
The init<orasid>.ora file has been edited by inserting the required  parameters

























Stop SAP only










Shutdown DB










Startup Database in mount state by giving the pfile path










Create spfile from pfile








Shutdown DB













Start DB


'









Start SAP


SAP Kernel Version Upgrade 720



This article shows us with detailed steps to upgrade SAP Kernel to 720 version.
It includes every step to be performed for the activity.
This procedure is for linux OS.

Stop the SAP system. (You do not need to stop the database.)
Login as adm
Stopsap r3 ( if it doesn’t work use hostname  with stopsap command)
Ex: Stopsap r3 SAPSID

Stop SAPOSCOL
Saposcol –k (with sidadm user)

Stop sapstartsrv
Kill -2 (with sidadm user)

If exists, unregister all standalone CCMS agents (sapccmsr [-j2ee],
sapccm4x). On Unix you can see corresponding processes
sapccm4x -u pf=
sapccmsr -u pf= [-j2ee]

Remove any IPC objects that still exist
cleanipc remove

Save old kernel before deploying new Kernel
As per sapnote we'd like to execute like below command
SAPCAR -cvf ../sapexe.tar (it wasn’t worked for me. So I took tar backup of exe dir)
As sidadm change directory to /sapmnt/SID
Execute below command
tar –cvf exe.tar exe ( we can take it as SIDexe.tar).

Delete all of the files existing in the kernel directory, including the
Subdirectories. This ensures that there are not any remaining files from
the earlier release, which have a special name in Release 7.20 or
are in a different place in a subdirectory.

Log on as user adm and switch to the directory
/usr/sap//SYS/exe/run
(Check twice on which locaton you're executing rm -rf command)
rm –rf * 

Unpack the new kernel with the following commands in the same dir.

/SAPCAR –xvf R3trans_221-10007264.SAR
/SAPCAR –xvf dw_utils_220-10007264.sar
/SAPCAR –xvf R3check_210-0007264.SAR
/SAPCAR –xvf R3ldctl_221-10007263.SAR
/SAPCAR –xvf R3load_221-10007263.SAR
/SAPCAR –xvf R3szchk_221-10007263.SAR
/SAPCAR –xvf sapcpe_218-10007264.sar
/SAPCAR –xvf SAPEXEDB_201-10007263.SAR
/SAPCAR –xvf SAPCAR_2-10007272.exe
/SAPCAR –xvf SAPEXE_201-10007264.SAR
/SAPCAR –xvf tp_340-20001346.sar
/SAPCAR –xvf saprouter_212-10007264.sar
/SAPCAR –xvf SAPSLDREG_210-10007264.SAR
/SAPCAR –xvf lib_dbsl_225-10007263.sar
/SAPCAR –xvf NWRFC_11-20004549.SAR
/SAPCAR –xvf DBATL720O10_25-10007263.SAR 

Delete all of the local executables from all the individual instances. 
To do this, switch to the  local executable directory of each instance.
/usr/sap///exe and execute

(Check twice on which locaton you're executing this command)
rm -rf *    

Installing SAPHOSTAGENT
For releases 7.00 and 7.01 (7.0 Enhancement Package 1), you need to also
install the package SAPHOSTAGENT.SAR within the latest 7.20 version available
(in accordance with Note 1031096).
Extract the SAPHOSTAGENT to a temporary folder. Here in this case we have already

Extract the HOST AGENT to temporary local folder.
cd /Common//Kernel_720/KERNEL_NEW/
mkdir SAPHOSTAGENT
cd SAPHOSTAGENT
/Common//Kernel_720/SAPCAR_5-20002089.EXE –xvf
/Common//Kernel_720/SAPHOSTAGENT111_111-20005731.SAR

Switch to root user
saphostexec –install
Run SAPROOT.SH

Switch to root
cd /sapmnt//exe
./saproot.sh 

Run sapcpe
As executables from the local executable directories may already be
executed for the beginning before sapcpe runs, start an initial copy of the executables.

cd /usr/sap///work
sapcpe pf=/usr/sap//SYS/profile/
sapcpe pf=/usr/sap//SYS/profile/

Post Actions
Special functions for the syslog (AS ABAP and Dual-Stack systems)
Due to things described in note 1517379, you've got to line the profile
Parameter

rslg/new_layout = 9.

If a syslog file already exists within the new format because this parameter
has not been set from the very beginning, the syslog will still be written
in the new format albeit the parameter has been set within the meantime. In
that case, the existing syslog files have to be deleted.

Dynamic work processes (AS ABAP and Dual-Stack systems)

The 7.20 kernel supports the dynamic increase of the amount of
work processes at runtime. However, this function is not fully compatible
with lower ABAP versions. To prevent errors from occurring, deactivate it
by setting the following parameters:

rdisp/wp_no_restricted = 0
rdisp/configurable_wp_no = 0
rdisp/dynamic_wp_check = FALSE

Start SAP system with new Kernel
Startsap r3 (with sidadm user)

Run sgen in productive client .



Wednesday, March 4, 2020

Oracle-flashback-in-12c



This article shows us the procedure to activate and de-activate falshback option in oracle database.
You can recover the DB with flash recovery which is very fast if you activate it and it is very useful when we are performing changes in the database

Preparations
  • · Please ensure the following preparations and pre-requisites are met before you enable or disable flashback.
  • · The flashback destination which is to be used should have enough space for flashback operations. You specify this using oracle parameter DB_RECOVERY_FILE_DEST.
  • · Ensure the database to be in Archivelog mode to activate flashback

Check the status of database
SQL> select log_mode, flashback_on from v$database;


Flash back parameters checks and activation
There are three parameters which needs to be set online.
SQL> show parameter DB_RECOVERY_FILE_DEST;
SQL> show parameter DB_FLASHBACK_RETENTION_TARGET;
SQL> alter system set DB_RECOVERY_FILE_DEST = '/oracle//sapdata1/flashback';
SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE = ;
SQL> alter system set DB_FLASHBACK_RETENTION_TARGET = 1440;

Enabling flashback for the database and creating restore point
SQL> alter database flashback on;
SQL> create restore point ;
 Issue below sql statement to check if already the Flashback process is running
SQL> select * from v$bgprocess where name='RVWR';
# ps –ef | grep rvwr
You can use the following command to check the restore points created and its size
SQL> SELECT NAME, SCN, TIME, DATABASE_INCARNATION#, GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE FROM V$RESTORE_POINT;

DISABLE Oracle Flashback
SQL> alter database flashback off;
At now if there are any guaranteed restore point, flashback status will show as Restore Point Only unless you delete the restore point manually.

IMP: Always drop the restore points when there's a confirmation that the flashback restore point is not any more needed for the project cutover

SQL> drop restore point TOP_CUTOVER;

Perform Flashback of database
Before performing Flashback please make sure that you've got all the redo logs generated after enabling the flashback as these are needed to perform Flashback.

Stop database
SQL> shutdown immediate;

Start DB in no mount mode
SQL> startup mount exclusive;

Go back to guaranteed restore point:
SQL> FLASHBACK DATABASE TO RESTORE POINT ‘top_cutover;

Go back to different point in time:
SQL> FLASHBACK DATABASE TO SCN ;
SQL> FLASHBACK DATABASE TO TIMESTAMP to_timestamp('YYYY-MM-DD HH24:MI:SS');

Flashback recovery is like incomplete media recovery, so open DB with
SQL> alter database open resetlog





Dealing with BW Nologging indexes post BW refresh

This document is to elucidate the rebuild the indexes post BW refresh for the indexes which are in “Nologging” mode.

AIM:
Required to rebuild the indexes after the BW system restore. Because in BW systems there'll be many indexes which are in “Nologging” mode, at the time of recovery they're going to not recover for more details please refer the (SAP Note: 547464), because of that you will get the errors like:

Block Checking: DBA = 48887003, Block Type = Found block already
marked corrupted
Block Checking: DBA = 48887004, Block Type = Found block already
marked corrupted

Procedure:
1. Copy the SQL code from the provided SAP note to the server with extension “.sql” (eg: generate_rebuild_only_by_time.sql)

2. Execute the generate_rebuild_only_by_time.sql with the 3 or 4hrs time stamp before the backup start time which you have taken for the restore (eg: if your backup start time 2019-08-15-05:00:00 execute the script like “@generate_rebuild_only_by_time.sql 2019-08-15-02:00:00”).

3. It  generates another script which looks like “generated_script.sql” in the same location where we ran that “generate_rebuild_only_by_time.sql”. script “generated_script.sql” consists the alter index commands for all the indexes which are within the “Nologging” mode.

4. Execute the “@generated_script.sql” for rebuilding all the indexes.
After succesful completion of the index rebuild, run the below reports in your BW system:

a. execute SAP report RSAR_PSA_PARTITION_CHECK with the options which as shown in the below snapshot



                   b.   SAP_INFOCUBE_INDEXES_REPAIR