You are on page 1of 4

02-09-07

Language: English
Author: Baldomero Garcia

How To: Unix Kernel Update


(based on the original version by Alvaro Ávila)

Objective: The objective of the following document is to describe the procedure


for the SAP Unix kernel update.

The SAP kernel is the central component of the database system which
manages access to the stored data in a database instance and processes the
SQL statements [1]; the used “kernel” definition used through this document
includes all the executable programs from /sapmnt/<SAPSID>/exe.

Note: it is important to consider that all the binary files found in the kernel belong
to the user <SID>adm, except the followings which belong to user ora<SID>:
brarchive, brbackup, brconnect, brtools y sapdba. The file saposcol belongs to
the root user. Kernel update has to be done in the central instance and in all the
application servers if the volume is not shared by NFS /spmnt/<SAPSID>/exe
and others.

Tested system information:


Database: Oracle (Release 9.2.0.7.0)
Operative System: HP-UX
SAP Release: 4.5B
Previous kernel patch level: 989 (64-bit)
Updated kernel patch level: 998 (64-bit)

Preparation steps:
1) Get the new required kernel
a. Log-in as user <sid>adm
b. Analyze if you have enough free space in /sapmnt/<SAPSID>/exe
to allocate the kernel files
c. Follow the following path through “sapnet” to get the kernel files:
Marketplace Archive for Support Packages and Patches  Entry
by Application Group  SAP Application Components  SAP R/3
 <SAP version> (in this case SAP R/3 4.5B)  SAP KERNEL
<version> (in this case 4.5B 64-bit)  HP-UX on PA-RISC 64bit
i.  #Database independent: download all files and
uncompress them (it is important to start with the “dw” file)
ii.  Oracle: download all files and uncompress them using
SAPCAR.

(it’s suggested to remove the “car” files after uncompressing them)

 To prevent data loss start the statistics collector manually


(Transaction SE38, report RSSTAT83). Verify in transaction ST03
or ST03N that all statistics are updated in all instances of the
system.

Note: This report is in charge of writing the statistic data in the TCOLL table;
verify that the data has been read to avoid multiple checks. It’s executed by the
standard job “SAP_APPLICATION_STAT_COLLECTOR” and its log can be
checked using transaction ST03 (Environment  Data collector Stat. rec. log.
This job will erase the statistics file when it grows to the maximum permitted size
(transaction ST03 Goto  Parameters  Performance database. Delete seq.
Statfile after cumulation if size....).

Kernel update:

1) Deactivate the monitors


a. BigBrother, Nagios, send a notification in Global news
b. Verify that nobody is connected (Transaction sm04 to al08)
i. SM04 shows connected users in the same instance that u
get connected
ii. AL08 shows all users connected by different instances

2) Stop all the services


a. Stop SAP on the central instance and all other instances: use
command stopsap r3
b. Stop “saposcol” from the path /sapmnt/<SAPSID>/exe: use
command ./saposcol –k
c. Use command sapccm4x –stop
pf=/usr/sap/<SID>/SYS/profile/<instance_profile>

 To verify that there are no other services execute


ps –ef | ^grep trdadm as user “<sid>adm”

 It is not necessary to shutdown the database, just the instance


3) Backup the old kernel (it’s suggested to do it as “root”)
a. From path /usr/sap/<SAPSID>/SYS/exe/run execute command
cp –rip * /usr/sap/<SAPSID>/SYS/exe/oldkernel

 To verify that all files are there use command ls –l as “root” (to
show all files)

4) Overwrite the kernel with the new one


a. In the path containing the new kernel use the command cp –rip *
/sapmnt/<SAPSID>/exe saying “yes” to all
b. Verify files’ permissions and owners: use commands
chown <usuario>:<grupo> <archivo> (to change owner)
chmod <codigo de permisos> <archivo> (to change permissions)
c. In the path /sapmnt/<SAPSID>/exe use command:
cd /usr/sap/<SAPSID>/SYS/exe/run
./saproot.sh <SAPSID>

 Please note that the following files have to have these permissions:

Permissions Owner Group File


lrwxrwxrwx 1 root root backint -> /opt/omni/lbin/backint
-rwsrwxr-x 1 oratrd sapsys brarchive
-rwsrwxr-x 1 oratrd sapsys brbackup
-rwsrwxr-x 1 oratrd sapsys brconnect
-rwxr-xr-x 1 oratrd sapsys brrecover
-rwsrwxr-x 1 oratrd sapsys brtools
-rwxr-xr-x 1 oratrd sapsys dbatoolsora.lst
-rw-rw-rw- 1 root sys dev_ipc
-rwxr-xr-x 1 oratrd sapsys initSID.dba
-rwxrwxrwx 1 oratrd sapsys initSID.sap
-rwsrwxr-x 1 oratrd sapsys sapdba
-rwxrwxrwx 1 oratrd sapsys sapdba_role.sql
-rwsr-xr-x 1 root sapsys saposcol

 If any permission type error appears over “root”, the last command
hasn’t been executed

5) Restart SAP
a. Start “saposcol”: use command
saposcol
b. Start SAP: use command
Starsap r3

FOR ANY RELATED AND MORE DETAILED INFORMATION, CONSULT:


- Note 318846
- Note 138704 (Supplying kernel releases with patches)
- Note 318846 (Installing 4.6D R/3 kernel in 4.6A/B/C SAP Systems)
- Note 155355 (Installation SAP R/3 4.5B-64bit kernel)

References:

[1]
http://help.sap.com/saphelp_erp2005vp/helpdata/en/68/5ef23f6fb9f206e10000000a1550b
0/frameset.htm

[2]
ÁVILA, Alvaro. “Actualización de kernel”. México, D.F.

You might also like