Instead of introduction.
Hello colleagues. This is my first topic on problem/solution about SAP patching process. Just a few months ago I came across SAP IDES update problem and I think this experience would be useful for everyone else, who struggling with the same issue or plan to update SAP instance. Despite the fact I use IDES system as an example, this topic could be used as a good starting process for PROD systems. This topic has originally been posted on my SCN blog page.
IDES on SAP ERP6 EHP6 on Windows 2008R2/MS SQL Server 2008R2
Content:
I. Common preparations;
II. Performance tuning;
III. Applying patches;
I. IDES common preparations to update SP (support package)
1. SAP Kernel update
Stop your SAP system, including any SAP services that were installed. Backup your kernel. Download the most recent kernel and apply. We need to download a kerned for this particular release, taking OS version and DB server into consideration. Assuming Kernel Release is 720_REL 64B UNICODE for IDES ERP6 EHP6 (as a matter a fact it is!), latest patch of Kernel on SMP is Patch 402 under path:
SAP MarketPlace => Software Downloads => Support Packages & Patches => A-Z Index => K => SAP Kernel 64 Bit Unicode => SAP KERNEL 7.20 64-BIT
UNICODE => <Your OS> => #Database independent:
SAP MarketPlace => Software Downloads => Support Packages & Patches => A-Z Index => K => SAP Kernel 64 Bit Unicode => SAP KERNEL 7.20 64-BIT
UNICODE => Windows on IA64 64bit -> MS SQL Server:
- Backup files in directories:
C:\usr\sap\<SID>\DVEBMGS00\exe
C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64
- Unpack the kernel:
- Create a directory (‘c:\update’ for instance) and copy ‘sapcar.exe’ there (from one of the directory specified above). Copy kernel update files to just created dir (SAPEXE_100-10011367.SAR and SAPEXEDB_100-10011365.SAR for instance… the name of the file can vary, depending on kernel release). Unpack the *.SAR archives using the command in command line:
sapcar -xvf SAPEXE_100-10011367.SAR
- Stop all the SAP* services in windows ‘control panel’ and sapmmc.
- Copy all the extracted files from both archives to the folders specified on the step B with replace.
- Now run the services again.
- It is highly recommended to read SAP Note 19466 before update and detailed user manual on this subject located here.
2. Make changes to the instance profile (RZ10)
First of all, import all active profiles (in RZ10 go to ‘Utilities’ menu -> Import profiles -> Of all active servers).
- Second of all, please read carefully this article about optimal values for ‘rdisp’
processes and calculate them in accordance to your system configuration.
- Here is the typical values (and
again, they could be not suitable for you hardware and may affect badly the
overall performance):
rdisp/wp_no_dia = 10
rdisp/wp_no_btc = 3
rdisp/wp_no_enq = 1
rdisp/wp_no_vb = 3
rdisp/wp_no_vb2 = 3
rdisp/wp_no_spo = 1
login/system_client = 800 (for IDES system)
rdisp/keepalive_timeout = 600
rdisp/keepalive = 6H
ms/keepalive = 9999999
ms/conn_timeout = 100000
ms/http_timeout = 600
em/initial_size_MB = 1024
icm/keep_alive_timeout = 6000
icm/conn_timeout = 9999999
rdisp/max_wprun_time = 14400
rdisp/gui_auto_logout = 0
c. Restart sapmmc to apply the changes.
3. Other post-install activities
a. Change passwords for SAP* (default values are: 06071992 or PASS on clients 000, 001) and DDIC users (19920706 for the same clients).
b. Connect SAP Online Help using SR13.
c. Use SE06 to initialize the TMS (t-code STMS).
d. Import RFC's
e. Check TMS configuration via ABAP report, use SE38, report RSTPTEST.
f. Add an initial screen system message called ZLOGIN_SCREEN_INFO using SE61.
g. Recompile all your ABAP loads by scheduling a job using SGEN.
h. Apply to SAP for your permanent license key.
j. Back up your system.
4. Update SAP components
Apart from kernel update it is required to patch other system components such as: DBSL (database package), TP, DISP+WORK, R3TRANS, R3TA, R3SZCHK, R3LOAD, R3LDCTL. On the screenshot below DBSL is already patched to the latest release:
Download, unpack and replace outdated system files with the new ones.
DBSL:
R3SZCHK, R3LOAD, R3LDCTL:
R3TRANS, R3TA:
TP, DISP+WORK:
II. Performance tuning
1. MS SQL Server tweaks & tricks
a. Apply latest SQL Server patches (there is SP2 available for MS SQL Server 2008 R2)
b. Update SQL Server statistics (sp_updatestats). There is no need to schedule a job because SAP has already done that itself.
c. Check out DBACOCKPIT to make sure there are no warnings on ‘Alert’ tab (it this tab is missing it means that current state of MS SQL Server is fine). Correct existing alerts according to the suggestions given:
d. Check DB02 t-code to make sure there are no missing objects in the database (Diagnostics -> Missing tables and indexes -> Objects missing in the database):
If there are indexes missing in the DB, please create them by scheduling a job, it will improve overall performance dramatically.
f. It is highly recommended to read SAP note 1237682 (SQL Server 2008 parameters).
g. Short instruction on how to apply a trace flag to SQL Server configuration:
- On the server where SQL Server 2008 has been installed.
- Start SQL Server Configuration Manager
- Choose the "SQL Server Services" in the left pane and then
- Right click on the SQL Server instance of interest
- Choose Properties
- In the Properties dialog box select the "Advanced" tab
- Drop down the list box to the right of "Startup Parameters"
- Add a semicolon at the end of all those parameters and then the trace flag: ;-T1117
h. It also required to move TEMPDB apart from SAP databases to improve the performance (SAP DB log should be moved to another disk as well). To do that please use the next t-sql statement:
- The first step is to determine the logical file name of the data files for tempdb:
USE
tempdb GO EXEC sp_helpfile GO
Knowing this we can run the following ALTER DATABASE statement in SQL Server 2005 or SQL Server 2008 to move tempdb. Set the FILENAME parameter to the location where you'd like each file:
USE
master
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = 'D:\tempdb2005.mdf') GO
ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = 'D:\tempdb2005.ldf')
GO
Restart SQLserver services and check whether configuration is correct.
2. Other preparation activities
a. Make sure after the Kernel update all of the below locations are of same Patch Level.
LOCATION 1: /sapmnt/<SID>/exe
LOCATION 2: /usr/sap/<SID>/<Instance>/exe
b. From the productive client check the TRBAT entries.
- You can clear two entries there (one is header information and other is ‘Tr’ number) from SM30 and then save.
- Then login to 000 client. Run RDDNEWPP in dialog mode and give it a Priority A.
- Then come back to the productive client and reimport the request.
- When reimporting, please check TRBAT table again (it should contain the current request only)
Theoretical help:
- Executing the report RDDNEWPP schedules the transport dispatcher RDDIMPDP as an event-controlled background job in the current client (use SE38, run (F8) and choose "High priority"). The transport dispatcher RDDIMPDP must be scheduled as a background job in client 000 and in all the clients from which data is exported or into which data is to be imported.
- When you execute the report RDDNEWPP, you are asked whether you want the job to be scheduled as normal (job class C) or with high priority (job class A). If you choose high priority, the transports will have priority over other background jobs.
- RDDIMPDP can be scheduled or rescheduled at any time by executing RDDNEWPP. Any earlier scheduling in the same client is deleted.
III. Applying service patches to IDES
1. Update support package manager (SPAM)
a. As a first step before any serious update – you have to update SPAM to the latest release available, you can check current release version by entering to this transaction:
b. In the console (cmd) go to “/usr/sap/trans” and unpack SPAM update package (KD73149.SAR for instance) using SAPCAR as it was shown in the first topic:
sapcar -xvf KD73149.SAR
In the “/usr/sap/trans/EPS/in” you will see *.PAT file.
c. Now go to ‘Support package -> Load package -> From application server’ menu:
Extracted files will be loaded to SAP.
d. Go back to the same menu and choose ‘Import SPAM/SAINT update’. Wait until SAP finished update processing.
2. Update SAP BASIS and ABAP components
a. First thing you need to know is that all the SAP SP updates are strongly sequential, ie we cannot have component of level 0002 and jump over the next one right to 0004 for instance, because 0003 should be applied first (in another words they are not cumulative!)
b. To check components patch level go to ‘System -> Status’ menu, and press ‘Component information button’:
c. Now you have to see all the components level:
d. Assuming you have already downloaded all the necessary patches (taking in account SAP release number, which is 731 in our case) you can go ahead to unpack them using SAPCAR. Go to “/usr/sap/trans” directory as usual and copy all the patches there:
After unpack they will be available in the “/usr/sap/trans/EPS/in”.
e. Go to client 000 and login with user DDIC.
f. Proceed to ‘Support package -> Load package -> From application server’.
g. Define the queue:
h. Remember that you have to update BASIS subsystem first, then ABAP:
j. You can add all the patches for BASIS in one queue or apply them one by one, but read the SAP note 1597765 first (about common errors of patches update). Be careful, as this note explains some common mistakes of update and also (which is more important) the right approach for BASIS update (the combination of SAP BASIS patches). I recommend to use small queues for better control on SAP update.
k. Remember! If you apply one single patch in the queue it shouldn’t take more than 2 hours! Thus it means that you didn’t follow the instructions preceding patching procedures.
l. Use ‘Component information’ window from step ‘c’ to make sure the update was successful.
Discuss this topic on the forum.