Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
khampariamukesh
Active Participant

SAP system refresh based on MaxDB Database

SAP refresh is a combination of 3 parts

1.       Pre-refresh work

2.       DB restore and recovery

3.       Post Refresh work

Every step has its own responsibility and every step should be considered critical.

This document meant to prepare ESPECIALLY for MAXDB restore part. Here I will give basis idea on Pre and post refresh work.

Pre-Refresh Work:

A.      Export SAP User

B.      Export the RFC destinations

C.      Check the license on target system

D.      Export CCMS Configuration - Create transport

E.      Transports

F.      Check the latest transport number

G.     Check the open transport requests

H.     Transport – STMS

I.       Logon Group – SMLG

J.      DB Planning - DB13

K.     Operations Basis Modes

L.      RFC Server Group – RZ12

M.    Clients settings - SCC4

N.     Kernel level

O.     Retention time - ST03

P.     Logical System – SALE

Q.     Partner Profiles - WE20

R.     Ports in IDoc processing - WE21

S.     Trusted RFC – SMT1

T.      SSO certificate – STRUSTSSO2

U.     Backup

V.     Stopsap

DB Restore and recovery:

  1. Initiate a backup of Source system à (Please take care of space related things in Target and temporary location)

1.       Create a template as per below: This will save data backup is temporary location

               

2.       Give full access to directory and file where Backup is being taken.

3.       Start backup by Right clicking on template and click on “Backup”

              

4.       Click on “Start” to start DataBackup

5.       You can monitor the status of backup successful in progress bar on Action Tab.

6.       Once Data Backup is completed, you could find entry like below:

Now we will start with RESTORE in Target location

7.       Create a same template in target system so that we can start restore and recovery (Exact Same, same location where you kept backup file)

8.      

Start RECOVERY by Right clicking on template and click on “Recovery”

9.       Please keep your DB at ADMIN mode or it will ask you to move the status at ADMIN state as below:

10.   Here Click on “ADMIN button”, it will take you in next screen then press “START” Once you click on start your restore is started.

11.   Once restore is completed, it will ask you to restart Database. Press on “RESTART” Button.

12.   Once you press “Restart”, it will restart your database and will start Recovery as well.

13.   Close this screen and restart your Database.

14.   You can confirm the recovery as below screen.

15.   Once you are done with restore part, you will have to perform below command with password from target system. (Note 1657257 - MaxDB-specific system copy: wrong SYSDBA)

  1. 1. Use dbmcli to set up a connection to the database:

dbmcli -d <databaseID> -u control,<control_password>

  1. 2. Execute the following commands:

load_systab -u superdba,<oldsuperdba_pwd>

sql_connect superdba,<oldsuperdba_pwd>

sql_execute alter password superdba <superdba_pwd>

quit

16.   Now perform the password change activity for all the DB users as below.

!!SAP MaxDB Password Change activity!!

This document is useful for those who perform MaxDB Password change activity every quarter in Production system to keep their systems secure!!

There are few points to remember:

a.       If SAP system is a dual stack system then you will have to change Java DB password first.

b.      Please keep MaxDB password in Capital letters

c.       You Should have access in DB59 T-code

Start from here:

1)      Change the password for the J2EE_ADMIN in su01

2)      Stop Sap

Go To MMC and stop SAP System.

3)      Log On to Config tool à Secure Area

Change the password for below entries for SAP<SID>DB user

(Remember not to change the DB password before this)

Admin/password/<SID>

JDBC/POOL/<SID>/PASSWORD

4)      Change DB Passwords:

Below Command will give you the list of DB users for which we have to change the passwords

F:\>sqlcli -U w \du      (w for Superdba user)

User type:

SAPSID

ABAP

SAPSIDDB

JAVA

SAPR3

LEGACY

F:\>sqlcli –U w alter PASSWORD SAP<SID> <<PASSWORD>>

  1. Outputà (0 Rows affected (some msec)

F:\>sqlcli –U w alter PASSWORD SAP<SID>DB <<PASSWPRD>>

  1. Outputà (0 Rows affected (some msec)

F:\>dbmcli -d <SID> -u SUPERDBA,<<OLD password>> -uSQL SUPERDBA, <<OLD password>> sql_execute ALTER PASSWORD <<OLD password>> TO <<NEW password>>

  1. Outputà OK

5)      STOP Database

F:\dbmcli –U c db_offline

  1. Outputà OK

6)      Now change the password for the user “control

F:\>dbmcli -U c user_put control password=<<NEW password>>

  1. Outputà OK

Now you will have to update the XUSER file entries

Go to the path where XUSER file is located.

Suppose it is in F drive.

è F:\>notepad xuser.txt

This will pop up the xuser notepad

è Change the old password with new password. (Be care full while changing manually)

Execute the command “xuser list” in the command prompt and it will show you the entries

è F:\>xuser list

You will find the xuser entries

è F:\>xuser clear

è F:\>xuser list

You will find nothing this time.

è F:\>xuser -b xuser.txt

This will update the entries in xuser file.

è F:\>xuser -c SAPServiceSID clear

è F:\>xuser -c SAPServiceSID list

You will find nothing this time.

è F:\>xuser -c SAPServiceSID –b xuser.txt

Now start your DB

è F:\>dbmcli –U c db_state

Offline

è F:\>dbmcli –U c db_online

OK

è F:\>dbmcli –U c db_state

Online

Update the password at DB studio so that you can connect to DB.

Now start SAP in MMC

Once SAP is started

Go To  DB59 and update the integration data

Select your SID

Click on Integration data

Go to change mode

Update the new password

Save

Confirm with Yes

Select you SID and Click on “connection test”

It should be successful

Restart of SAP and DB again.

1.1.1. Import the RFC destinations

1.1.2. rdisp/wp_no_btc = 0

Edit the profile and change the parameter of rdisp/wp_no_btc to zero so that there should not be any jobs running just after the refresh. Keep the original value in comment.

1.1.3. Start sap

1.1.4. Lock all the users - EWZ5

1.1.5. Lock scheduled jobs - BTCTRNS1

1.1.6. rdisp/wp_no_btc = <original value>

Change the value of the profile parameter rdisp/wp_no_btc to the original value. We had set this value to zero in step 1.1.2

1.1.7. Stop and start SAP

1.1.8. Run SICK command

1.1.9. Logon to client 000 and run transaction SE06

1.1.10.Include system in STMS

If RFC error coming , We found a SAP note ( Note 1532825 - Deleting SECSTORE entries during system export/system copy).

1.1.11.Delete the jobs RDD*

1.       Delete the jobs RDD* which are in Released state.

2.       Create the job RDDIMPDP using the report RDDNEWPP in client 000 and Default Client.

1.1.12.           To give the correct sequence number for Transport

SQL> conn sapr3/SAP

  1. Connected.

SQL> update E070L set trkorr = 'TR No. taken in Pre-check';

1 row updated.

SQL> commit;

Commit complete.

SQL>

1.1.13.           Import the users      

1.1.14.           Change the password of SAP* and DDIC if required

1.1.15.           Remove old job logs, spools, dumps and logs

                Rsbtcdel

rspo0041 or RSPO1041
rsbdcreo

rssnapdl

1.1.16.           Run RZ10 and delete the profiles

1.1.17.           Import the printers or to assign the good print server

1.1.18.           Remove the old entries of blocking (SM12)

1.1.19.           Remove the old recordings of update

1.1.20.           Purge the following tables

                sql_execute truncate table <<SCHEMA>>.DBSTATHORA

                        sql_execute truncate table <<SCHEMA>>.DBSTAIHORA

                        sql_execute truncate table <<SCHEMA>>.DBSTATIORA

                        sql_execute truncate table <<SCHEMA>>.DBSTATTORA

                        sql_execute truncate table <<SCHEMA>>.PAHI

                        sql_execute truncate table <<SCHEMA>>.DBSNP

                        sql_execute truncate table <<SCHEMA>>.SDBAH

                        sql_execute truncate table <<SCHEMA>>.SDBAD

                        sql_execute truncate table <<SCHEMA>>.SDBAP

                        sql_execute truncate table <<SCHEMA>>.SDBAR

                        sql_execute truncate table <<SCHEMA>>.ALCONSEG

                        sql_execute truncate table <<SCHEMA>>.ALSYSTEMS

                        sql_execute truncate table <<SCHEMA>>.DDLOG

                        sql_execute truncate table <<SCHEMA>>.TPFET

                        sql_execute truncate table <<SCHEMA>>.TPFHT

                        sql_execute truncate table <<SCHEMA>>.TLOCK

                        sql_execute truncate table <<SCHEMA>>.ALHDR

                        sql_execute truncate table <<SCHEMA>>.BALHDRP

                        sql_execute truncate table <<SCHEMA>>.BALM

                        sql_execute truncate table <<SCHEMA>>.BALMP

                        sql_execute truncate table <<SCHEMA>>.BALDAT

                        sql_execute truncate table <<SCHEMA>>.BALC

                        sql_execute truncate table <<SCHEMA>>.BAL_INDX

                        sql_execute truncate table <<SCHEMA>>.EDIDS

                        sql_execute truncate table <<SCHEMA>>.EDIDC

                        sql_execute truncate table <<SCHEMA>>.EDIDOC

                        sql_execute truncate table <<SCHEMA>>.EDI30C

                        sql_execute truncate table <<SCHEMA>>.EDI40

                        sql_execute truncate table <<SCHEMA>>.IDOCREL

                        sql_execute truncate table <<SCHEMA>>.SRRELROLES

                        sql_execute truncate table <<SCHEMA>>.SWW_CONT

                        sql_execute truncate table <<SCHEMA>>.SWW_CONTOB

                        sql_execute truncate table <<SCHEMA>>.SWWWIHEAD

                        sql_execute truncate table <<SCHEMA>>.SWWLOGHIST

                        sql_execute truncate table <<SCHEMA>>.BDCP

                        sql_execute truncate table <<SCHEMA>>.BDCPS

                        sql_execute truncate table <<SCHEMA>>.DBTABLOG

                        sql_execute truncate table <<SCHEMA>>.DBTABPRT

                        sql_execute truncate table <<SCHEMA>>.ARFCSSTATE

                        sql_execute truncate table <<SCHEMA>>.ARFCSDATA

                        sql_execute truncate table <<SCHEMA>>.ARFCRSTATE

                        sql_execute truncate table <<SCHEMA>>.TRFCQDATA

                        sql_execute truncate table <<SCHEMA>>.TRFCQIN

                        sql_execute truncate table <<SCHEMA>>.TRFCQOUT

                        sql_execute truncate table <<SCHEMA>>.TRFCQSTATE

                        sql_execute truncate table <<SCHEMA>>.SDBAH

                        sql_execute truncate table <<SCHEMA>>.DBMSGORA

                        sql_execute truncate table <<SCHEMA>>.APQD

                        sql_execute truncate table <<SCHEMA>>.SWELOG

                        sql_execute truncate table <<SCHEMA>>.TXMILOGRAW

                        sql_execute truncate table <<SCHEMA>>.TSPEVDEV

                        sql_execute truncate table <<SCHEMA>>.SNAP

                        sql_execute truncate table <<SCHEMA>>.TPRI_PAR

1.1.21.           Perform the conversion of the logical systems (BDLS)

1.1.22.           set Archivelog Mode ON

1.1.23.           Create the operation Modes again

1.1.24.           Make a consistency check of TemSe, run transaction SP12.

1.1.25.           RFC Server Group Maintenance (RZ12)

1.1.26.           Run transaction SMLG

1.1.27.           Run SCC4 and check the settings

1.1.28.           Schedule the DB13 jobs

1.1.29.           Run SGEN to compile all the object

Labels in this area