Monday, August 7, 2017

Trusted RFC between APAB Systems


- Create an RFC between two systems without maintain logon data 


- Create a Trust relationship . your user must have authorization on object S_SR on target system


Now go to Other ABAP system create RFC and Trust relationship

Create Trust relationship , 

Kernel Patching 745 to 749



Kernel Patching ... 745 to 749 .

- Download kernel files from SAP SWDC

---- Extract Kernel files

----- SAPCAR -xvf  SAPEXE_xyz.SAR  /sapmnt/SID/newexe (Kernel Part I DB independent)
----- SAPCAR -xvf  SAPEXEDB_xyz_.SAR  /sapmnt/SID/newexe (Kernel Part II DB dependent)
----- SAPCAR -xvf  dw_527_xyz.sar  /sapmnt/SID/newexe  (disp+work package)
----- SAPCAR -xvf  lib_dbsl_xyz.sar /sapmnt/SID/newexe (Database library)

Take backup of existing exe directory

Check path
login with SIDADM user and execute following command to check path

sappfpar pf=ECD_DVEBMGS00_SID.pfl

This will give you current directory path of kernel executable

Stop - SAP

/sapmnt/SID/exe/us/linuxx86_64

replace extracted files to this current kernel directories

now login as root and set premission on kernel direcoty

chown -R sidadm:sapsys /sapmnt/SID/exe/uc/linuxx86_64

and execute saproot script.

/sapmnt/SID/exe/uc/linuxx86_64/saproot.sh SID

and Start - SAP

******************************
To check patching History in System

Go to
SE16 and enter table name PATCHHIST

for details check SAP Note : 2450700

https://launchpad.support.sap.com/#/notes/2450700/E

***************************************************************

Sybase Database : Source database is larger than the target database,

You can also refer to SAP Note : 2345568
https://launchpad.support.sap.com/#/notes/2345568/E


Symptom

1) While restoring you will get error
Data on dump will not fit into current database. Need <xxx> Mbyte database

2) System Copy fails with error "Unable to load database <SID>

Cause
- The source database, where the dump was taken, is larger than the target database , where it is loaded
- The 'create database' statements are different between source (dump) and target (load).

Resolution :

To increase target database size , we need to check source database size for this execute load command with 'listonly=create_sql" this will generate a list of DDL command that contain data file size and log file size.

load database SID from "/backup/SID.dump_file" with listonly=create_sql
go


If the database already exist first you have to drop that database and also need to drop device layout for Data & Log files. 


***************
Command to drop devices 

sp_dropdevice <device name>
go 

i.e sp_dropdevie ECD_data_001
go 

***************
Command to Check size of DB 
sp_helpdb ECD 
go

***************
Below DDL's are generated from commands (in purple) & execute these command by order

load databae ECD from "/backup/ecd_dump.dmp" with listonly=create_sql
go 

or

go >> Script_DDL.sql

check file in /sybase/<SID>/  --- directory

***************



Command to create new devices 


DISK INIT

         name = 'ECD_data_001'
        , physname = '/sybase/ECD/sapdata_1/ECD_data_001.dat'
        , size = '108G'
        , directio = true
go


DISK INIT

         name = 'ECD_log_001'
        , physname = '/sybase/ECD/saplog_1/ECD_log_001.dat'
        , size = '10G'
        , directio = true

***************

Command to create database 

go

CREATE  DATABASE ECD
        ON ECD_data_001 = '10G'
        LOG ON ECD_log_001 = '10G'
WITH lob_compression = 100
        , inrow_lob_length = 2000
        , compression = page
        , index_compression = page
go

***************


Command to alter database 



ALTER  DATABASE ECD

        ON ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
                , ECD_data_001 = '1G'
go

***************

other execute ables 


master..sp_dboption ECD, 'abort tran on log full', true

go
master..sp_dboption ECD, 'allow nulls by default', true
go
master..sp_dboption ECD, 'allow wide dol rows', true
go
master..sp_dboption ECD, 'ddl in tran', true
go
master..sp_dboption ECD, 'deferred table allocation', true
go
master..sp_dboption ECD, 'full logging for all', true
go
master..sp_dboption ECD, 'allow incremental dumps', true
go
master..sp_dboption ECD, 'deallocate first text page', true
go
master..sp_dboption ECD, 'allow db suspect on rollback error', true


**************************************************
Apply transaction logs if required and issue database online command