Visit our Google Group Way 2 SAP BASIS

Applying Hot Patch Step By Step.doc

Moderators: BASIS24x7, Rashed

Applying Hot Patch Step By Step.doc

Postby moiz7070 »

Follow these procedures if using NT/2000: Applying Hot Patch Step By Step:


 Download the support packs from service.sap.com (provided you have a login ID) to the usr\sap\trans directory.
 Open a command prompt and change the directory to usr\sap\trans
 Unpack the support packs using the following command:
 car -xvf .CAR
 This command unpacks the files that need to be imported into your SAP instance into the usr\sap\trans\eps\in directory.
 Log into client 000 as user DDIC
 Call transaction SPAM
 Once in transaction SPAM, go to menu option Support Package->Load Packages->From Application Server. It will ask you if you want to upload the files - click the green check mark on the box that appears to upload the files.
 Another screen will appear listing the files that you uploaded successfully - just click on the Back arrow to get back to the SPAM screen.
 On the SPAM screen, click on the Display/Define button.
 A box will appear with the Support Package categories (Basis, ABA, etc.)
 Click on the category for the support packages that you uploaded and it will list them in order.
 You can apply them individually or the whole list at one time.
 To apply individually, select the first one in the list and then hit the green check mark at the bottom left of the box. Then on the SPAM screen, go to menu Support Package->Import Queue.
 Confirm that you want to import the support package.
 Once it is done importing, you have to confirm the queue by clicking on the
 Confirm Queue button - this will turn the yellow light in the Status area to green.


Important Note:

*Always check your logs after applying support packages by clicking on the Logs button in the SPAM screen.

step by step (HP)

1. Load the CD containing the patches.

2. Log on to the operating system as:
NT: adm
UNIX: adm

3. Change to the transport directory.
NT: :\usr\sap\trans
UNIX: /usr/sap/trans

4. Unpack the patch archive.
NT: CAR -xvf :\\.CAR
UNIX: CAR -xvf ///.CAR

The next step is to upload the patch from the operating system into R/3.
1. Log on to client 000, under any user that has SAP*-equivalent authorizations.
2. In the Command field, enter transaction SPAM and choose Enter
(or from the SAP standard menu, choose Tools ABAP Workbench Utilities Maintenance SPAM-Patches).
3. From the menu bar, choose Patch Upload.
4. Choose .
5. Check that the Support Packages have successfully uploaded.
6. Choose Back.
7. Select All patches.
8. Choose Display.
9. The patch is under New patches.

Developer Key
(After creating a client and user, where do I enter the developer key?)
You first need to register the new user on SAPNet (http://service.sap.com/sscr).

The developer keys are based on your Installation Number of the R/3 server. You have to logon to your SAP marketplace & give the installation no. of the R/3 server whose object/program you are modifying, which would provide you with the developer key, which should/can be used for that system.

You will need to inform SAP of the informaion below as well:
SAP license HARDWARE KEY
SAP version
System ID
System Number: 00 &
os/db like NT/Intel Oracle


Homogeneous Copy of Objects from One R/3 System to Another

The following steps are for Unix environment, but it should be the same for NT too.

Source SID: SSD
Target SID: TSD

On target system, you only need the following 3 CDs:
- Kernel
- Rdbms1
- Rdbms2

SUMMARY OF STEPS:
A. Take an offline Backup of the Source SAP Database
B. Run the r3copy (from the kernel CD in /UNIX/COMMON) on the source system as ORASID to create CONTROL.SQL and INIT.ORA in /oracle/SSD/sapreorg/
C. Copy /oracle/SSD/sapreorg/CONTROL.SQL to /oracle/TSD/sapreorg/
D. Copy /oracle/SSD/sapreorg/initTSD.ora to /oracle/TSD/sapreorg/
E. On Target Create the file systems and copy the data files from source system
F. Execute the unix/INSTTOOL.SH , INSTGUI and R3SETUP on target system (these are on the kernel cd)
G. Run RUNINSTALLER on Target system (from /oracle/stage/817_64/Disk1/SAP)
H. Run r3copy on the target system (From /oracle/SID/sapreorg)
I. Continue / restart R3SETUP to finish R/3 installation.
J. Post installation process - install license, import profiles using RZ10, configure STMS


How to make a system copy:

1. Take offline backup of both the server (source and target servers)
2. Verify the backup is successfully done.
3. Run the following command on source system.
a. Login as <sid>adm
b. svrmgrl
c. connect internal
d. alter database backup controlfile to trace;
e. exit;
f. Above command will generate a .trc file in /oracle/P01/saptrance/usertrace directory.
g. Copy the text from CREATE CONTROLFILE until the (;) and paste it in to any new .sql or controlfile.sql file.
h. Copy the controlfile.sql to target system.
i. Edit the file and replace the entire source SID to target SID.
j. Edit the reuse database command with the set database command
4. Copy the aft generated during the backup file from the source system to target system. (/oracle/<sid>/sapbackup)
a. Change all the source <sid> to target <sid>.
b. Only don't change the backup volume name it must be target system <sid>.
c. Copy the above aft file name line from the source back<sid>.log to target<sid>.log file.
5. Shutdown the target server instance.
6. From this onwards all the command on the target system only.
a. Login as <sid>adm
b. run the SAPDBA
c. select J (Restore/Recovery)
d. select B (Full restore and recovery)
e. select A (Select backup of type)
f. Select the offline backup which you want to restore.
g. It will take some time to restore.
h. Once the database is restored login as <sid>adm and run the
i. svrmgrl
j. connect internal;
k. startup nomount (if the database is already mounted shutdown it using the shutdown command)
l. run the following command
m. @controlfile.sql (file name of the control file contains the CREATE CONTROLFILE statement)
n. After the run the above command it should give the "Statement Processed)
o. alter database open resetlogs
p. shutdown
q. Start the database and SAP services using startup.
7. After this you have to reconfigure the STMS.
8. All the jobs also you have to reconfigure and reschedule.
9. Reconfigure all the printers.
10. If you want to change the Client number then use the local copy tool and remove the original client after successfully import to new client.


How to Make a System Copy:

1. Take offline backup of both the server (source and target servers)
2. Verify the backup is successfully done.
3. Run the following command on source system.
a. Login as adm
b. svrmgrl
c. connect internal
d. alter database backup controlfile to trace;
e. exit;
f. Above command will generate a .trc file in /oracle/P01/saptrance/usertrace directory.
g. Copy the text from CREATE CONTROLFILE until the (;) and paste it in to any new .sql or controlfile.sql file.
h. Copy the controlfile.sql to target system.
i. Edit the file and replace the entire source SID to target SID.
j. Edit the reuse database command with the set database command

4. Copy the aft generated during the backup file from the source system to target system. (/oracle//sapbackup)
a. Change all the source to target .
b. Only don't change the backup volume name it must be target system .
c. Copy the above aft file name line from the source back.log to target.log file.
5. Shutdown the target server instance.
6. From this onwards all the command on the target system only.
a. Login as adm
b. run the SAPDBA
c. select J (Restore/Recovery)
d. select B (Full restore and recovery)
e. select A (Select backup of type)
f. Select the offline backup which you want to restore.
g. It will take some time to restore.
h. Once the database is restored login as adm and run the
i. svrmgrl
j. connect internal;
k. startup nomount (if the database is already mounted shutdown it using the shutdown command)
l. run the following command
m. @controlfile.sql (file name of the control file contains the CREATE CONTROLFILE statement)
n. After the run the above command it should give the "Statement Processed)
o. alter database open resetlogs
p. shutdown
q. Start the database and SAP services using startup.
7. After this you have to reconfigure the STMS.
8. All the jobs also you have to reconfigure and reschedule.
9. Reconfigure all the printers.
10. If you want to change the Client number then use the local copy tool and remove the original client after successfully import to new client.


Kernel Upgrade:
Here are our detailed procedures for updating a kernel patch. To make
things easier, we also created some shell scripts to back up the executables
and copy the new ones.

I. Download files to local directory from Sapnet (Sapserv4).

1) Review OSS note 19466 for basic information.

2) Go to www.saplabs.com and log into "SAP Service Marketplace." You will need your OSS ID and password. Next, click on "System Admin," and go to "SAP online Corrections." Finally, navigate to "Download Kernel/Frontend Patches."

3) Enter the correct "Product data" " (SAP R/3, 4.5B, Kernel Patches), and click on "next page."

4) Enter the correct "System data" (i.e. SAP Kernel 4.5B, Solaris, Oracle), and click on "next page".

5) Select all files to download. At this point you can click on "Mark for Download." Note: You must have SAP Download Manager installed on your workstation. If you do not have this, you will need to load it first.

6) If the status indicates the data is flagged for download, click on "Close."

7) Click on "Maintain download basket."

8) Click on "Start Download." This will move the downloaded file to your local drive.


II. Applying the kernel patches.

1) You now need to FTP the downloaded files to the Unix server. Go to Start --> programs --> reflection --> FTP client and connect to the server. Navigate to /sapsource/downloads and create a new folder as Updates
(i.e.: JulUpdates2001). FTP all of the kernel patches to this folder.

2) Telnet into the server as adm. Navigate to /sapsource/downloads and remove all update folders except the 2 most recent ones.

3) Copy the CAR executable file to the new update folder.
(i.e.: Cp/usr/sap//SYS/exe/run/CAR /sapsource/download/JulUpdates2001

4) The saposcol file for 4.5B and 4.6C must be a 64bit version since our OS level is 64bit. (get this from 64bit Solaris under 5.6D) - see OSS note
19227

5) Navigate to the update folder and uncar the files. (i.e.: CAR -xvf
BRARCHIVE.CAR).

6) You can then delete all of the .car files (i.e.: rm *.CAR and rm *.car)

7) Back up the exe/run directory by running
/sapsource/scripts/bkup_files.sh.
Source: /sapsource/downloads/Updates
Target: /usr/sap//SYS/exe/run
This backup script will copy the files from exe/run and put a current date extension on them (i.e.: brarchive.07022001). Verify that all the files you downloaded were backed up in the exe/run directory.

8) Notify users that you will be bringing the system down for approx. 1/2 hour.

9) Stop R/3 and the database: /export/home/adm.
Stopsap__<00> ALL
If the saposcol file is being replaced, stop the saposcol service.

10) Run /sapsource/scripts/cp_files.sh.
Source: /sapsource/downloads/Updates
Target: /usr/sap//SYS/exe/run
This will copy the files from Updates and put them in
/usr/sap//SYS/exe/run.

11) Verify that all the files were copied from the Updates directory to exe/run. (Check the file sizes to make sure they match).

12) Check that the br* files have ora as the owner except for brrestore.

13) Check that the br* files have the correct permissions (-rwsrw-r-x). Brrestore should be (-rwxrw-r-x). If the sticky bit (s) is not on, do a "chmod 4755 br*" as user ora to change them.

14) If saposcol is being replaced, it must be owned by "root" and also have the sticky bit on.

15) Remove all old backup files from the exe/run directory keeping the latest backup.

16) Bring the system back up: /export/home/adm
Startsap__<00> ALL
If the saposcol file is being replaced, start the saposcol service.

17) Log into the system you updated and verify that it is OK.

18) Notify the users that the system is now available.

19) Once Sandbox is completed and it ran for a few days you can continue
updating the landscape, starting at step II.7).
Transaction Code for Users
(I would like to find out all the transaction codes available to each user)
Goto SUIM >> transactions >>
Transaction Lists According to Selection With User,
Profile or Object >> Executable for User >> >
Shaik Moiz Ahmed
Terrenos Software Technologies Pvt.Ltd
moiz7070
 
Posts: 14
Location: Hyderabad

Re: Applying Hot Patch Step By Step.doc

Postby shafibasis »

Aslkm dear bro !

Thanx a Million for this post ..... u did a brilliant job for us...i really appreciate.
Shafi
Version I.T
Shafi_edu@hotmail.com
shafibasis
 
Posts: 1


Return to Patch Management Forum

Who is online

Users browsing this forum: No registered users and 1 guest

Visit our Google Group Way 2 SAP BASIS
cron