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. 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)
dbmcli -d <databaseID> -u control,<control_password>
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>>
F:\>sqlcli –U w alter PASSWORD SAP<SID>DB <<PASSWPRD>>
F:\>dbmcli -d <SID> -u SUPERDBA,<<OLD password>> -uSQL SUPERDBA, <<OLD password>> sql_execute ALTER PASSWORD <<OLD password>> TO <<NEW password>>
5) STOP Database
F:\dbmcli –U c db_offline
6) Now change the password for the user “control”
F:\>dbmcli -U c user_put control password=<<NEW password>>
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.
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.
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
If RFC error coming , We found a SAP note ( Note 1532825 - Deleting SECSTORE entries during system export/system copy).
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.
SQL> conn sapr3/SAP
SQL> update E070L set trkorr = 'TR No. taken in Pre-check';
1 row updated.
SQL> commit;
Commit complete.
SQL>
Rsbtcdel
rspo0041 or RSPO1041
rsbdcreo
rssnapdl
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |