Wednesday, June 15, 2011

How to apply SAP Bundle patch


SAP Note 1027012 - MOPatch - Install Multiple Oracle Patches in One Run
SAP Note 839182 - Installing patches using OPatch
SAP Note 1175996 - Automated Oracle 10g11g patches check
Extract of SAP Note 1027012 - MOPatch - Install Multiple Oracle Patches in One Run

Use the following commands to determine the versions of the OPatch and MOPatch utilities installed in an Oracle Home:
$ORACLE_HOME/OPatch/opatch version
$ORACLE_HOME/MOPatch/mopatch.sh -h
 

  1. Check SAP Bundle patch installed version.
You can find the version of the currently installed SBP in an Oracle Home in file $ORACLE_HOME/sapbundle/version.txt. After you have successfully run catsbp.sql, you can also find the SBP version in the database in view dba_registry_history in the most recent row associated with bundle series SBP.

  1. Oracle SAP Bundle Patch applies.
Need to follow below steps along with referring README.html file of SAP Bundle Patch zip file.
 
2.2 Installing the SAP Bundle Patch (as per README.html file of SAP Bundle Patch zip file)
Follow the steps below.
o    Check 1.4 OPatch and MOPatch Utility Information
You must use OPatch version 11.2.0.3.1 for installing this SBP. Later 11.2 OPatch versions are supported as well, but Oracle recommends to use version 11.2.0.3.1, since it has been fully tested to interoperate with this SBP.

You must use MOPatch version 2.1.13 or later for installing this SBP.
o    Stop all database applications, in particular all SAP applications.
Performed in step 1 above.
o    Shut down the database instances, the listeners, and other processes associated with the Oracle Home.
su - ora<sapsid>
testsap1:oraehp 51> lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 27-AUG-2012 17:00:07

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EHP.WORLD))
The command completed successfully
testsap1:oraehp 52>


o    Update OPatch version which downloaded from service market place.
su - ora<sapsid>
cp /tmp/opatch-112031.zip $ORACLE_HOME           
cd $ORACLE_HOME
unzip -d $ORACLE_HOME opatch-112031.zip
rm opatch-112031.zip
 
o    Update MOPatch version which downloaded from service market place.
su - ora<sapsid>
cp /tmp/mopatch-2_1_13.zip $ORACLE_HOME
cd $ORACLE_HOME
unzip -d $ORACLE_HOME mopatch-2_1_13.zip
rm mopatch-2_1_13.zip

o    Recommended as per README file
      Some of the patches from a previous SBP have been reverted to an earlier patch version or obsoleted without being replaced by newer patches. Uninstall these patches manually as follows:

su - ora<sapsid>
/bin/sh $ORACLE_HOME/OPatch/opatch nrollback -silent -local -id 9935787,10401327,13603688,13603695

Check installed Opatch id with below command
/oracle/EHP/112_64/OPatch/opatch lsinventory -patch

o    Install the SAP Bundle Patch (11.2.0.2.7) as follows:
Create patch base directory
su - ora<sapsid>
cd /oracle/<SAPSID>
mkdir patches.112027
mv /tmp/SAP_112027_201208_LINX8664.zip /oracle/<SAPSID>/patches.112027
cd /oracle/<SAPSID>/patches.112027
/bin/sh $ORACLE_HOME/MOPatch/mopatch.sh -v -s SAP_112027_201208_LINX8664.zip
           
Check the generated MOPatch report for errors or unresolved conflicts. To resolve them, refer to section 4, "Known Issues" and to section "Resolving Patch Conflicts and Errors" of SAP Note 1027012 MOPatch - Install Multiple Oracle Patches in One Run.

o    Start up the database instances, the listeners, and other processes associated with the Oracle Home.
su - oraehp
lsnrctl start
sqlplus “/nolog”
conn sys as sysdba
startup;

o    2.3 Executing Post-Installation Instructions (setting oracle parameters)

Patch 14208494 (CBO Merge Patch), added in SBP 11.2.0.2.7 201208

Please use the following statements to adjust your _fix_control and event settings in your spfile according to SAP note 1431798 with the new SBP:

ALTER SYSTEM SET "_FIX_CONTROL"=
'5099019:ON','5705630:ON','6055658:OFF','6399597:ON','6430500:ON','6440977:ON',
'6626018:ON','6972291:ON','8937971:ON','9196440:ON','9495669:ON','13077335:ON',
'13627489:ON'
COMMENT='SAP_112027_201208 RECOMMENDED SETTINGS'
SCOPE=SPFILE;

ALTER SYSTEM SET EVENT=
'10027',
'10028',
'10142',
'10183',
'10191',
'10995 level 2',
'31991',
'38068 level 100',
'38085',
'38087',
'44951 level 1024'
COMMENT='SAP_112026_201207 RECOMMENDED SETTINGS'
SCOPE=SPFILE;

Please restart the database after you have adjusted these parameters.

o    For each database instance running from the Oracle home*, connect to the database instance as SYSDBA using SQL*Plus and run the post-installation script catsbp.sql: ( total time taken 2 hrs )

cd /oracle/EHP/11202/sapbundle/SBP_112027_201208

sqlplus / as sysdba
SQL> @/oracle/EHP/11202/sapbundle/SBP_112027_201208/catsbp.sql
SQL> quit

The script evaluates the log files generated by all intermediate steps for unkown errors. If it detects such errors, refer to the log files for more information, resolve the errors and, depending on the error cause, re-start the script. The script may furthermore perform some checks on whether additional post-installation actions are required depending on the state of the database.

To avoid an extra shutdown-startup cycle of the database instance, you should implement any system parameter changes (for example, additions of events and fix controls) from section 2.3, "Executing Post-Installation Instructions" in the above step as well.

o    2.3 Executing Post-Installation Instructions

Patch 14243939, added in SBP 11.2.0.2.7 201208

    After catsbp.sql has been executed please check if there are some invalid objects left over.
    If this is the case please run utlrp.sql to get rid of those invalid objects.

    Please perform the following steps:
      cd /oracle/EHP/11202/
      sqlplus sys as sysdba
    -- List all invalid objects before executing utlrp.sql
       spool invalid_objects_before_utlrp.txt
set cmdsep on
set lines 150 pages 40
col compiled_at for a30; col compiled_by for a10; col owner for a10; col object_name for a35;
col object_type for a12; col object_id for 999999 head obj_id
select do.owner,do.object_name,do.object_type,urc.*
from utl_recomp_compiled urc, dba_objects do where urc.obj# = do.object_id order by compiled_at;

select owner,object_name,object_id,object_type,created,last_ddl_time,timestamp,status
from dba_objects where status = 'INVALID' order by object_name;
spool off

    -- Execute utlrp
       @/oracle/EHP/11202/rdbms/admin/utlrp.sql

    -- List all invalid objects after executing utlrp.sql
       spool invalid_objects_after_utlrp.txt
set cmdsep on
set lines 150 pages 40
col compiled_at for a30; col compiled_by for a10; col owner for a10; col object_name for a35;
col object_type for a12; col object_id for 999999 head obj_id
select do.owner,do.object_name,do.object_type,urc.*
from utl_recomp_compiled urc, dba_objects do where urc.obj# = do.object_id order by compiled_at;

select owner,object_name,object_id,object_type,created,last_ddl_time,timestamp,status
from dba_objects where status = 'INVALID' order by object_name;
spool off
Patch 14252895, added in SBP 11.2.0.2.7 201208 (already fixed earlier hence not perform this time)

    To enable this fix event 31991 level 1 has to be set.

    To set this event 31991 please use the 'ALTER SYSTEM SET EVENT' statement that is listed in the Post-Installation Instructions section for the current CBO Merge Patch.

    Please restart the database after you have adjusted these parameters.

Patch 13575265, added in SBP 11.2.0.2.5 201203      (not performed below as not using DATA VAULT)

    For Database Vault systems, if Database Vault is already installed,
    run the following script (for RAC systems, run the script on one of the nodes):

    sqlplus / as sysdba                                                    
    spool patch_13575265.log                                           
    @?/rdbms/admin/prvtlbac.plb                                       
    spool off                                                         
    exit  

    The following error message can be ignored:
    'ORA-00955: name is already used by an existing object'

o    Oracle PSUs don't change the oracle release version/fifth digit. That is also described in metalink note #861152.1.
The significance of each number (reading from left to right) is as follows: The release number is 11.2.0.2.0.
11 is the major database release number
2 is the database maintenance release number
0 is the application server release number
2 is the component-specific release number
0 is the platform-specific release number

You can verify the installed PSUs / SBPs with the following query (check the comment section):
1.execute below query
set linesize 500
select substr(action_time,1,30) action_time, substr(id,1,10) id, substr(action,1,10) action,
substr(version,1,8) version, substr(BUNDLE_SERIES,1,6) bundle, substr(comments,1,20) comments
from registry$history;

2. execute below query (this get updated post executation catsbp.sql script after SBP update. if you fogot to execute this script you will not get detail in this view)
select * from dba_registry_history;

o    Start all database applications, in particular all SAP applications.

Monday, June 13, 2011

Oracle has announced an extended maintenance period for Oracle 10.2

Oracle has announced an extended maintenance period for Oracle 10.2 from August 01, 2010, until July 31, 2013.
During the first year (from August 01, 2010 to July 31, 2011), Oracle will provide this extended maintenance at no extra cost.
During the period from August 01. 2011 to July 31, 2013, extended maintenance for Oracle 10.2 is subject to an additional fee.
For more information, see SAP Note 1110995 and SAP Note 1339724.

SAP Note 1110995 - Extended maintenance for Oracle Version 10.2
SAP Note 1339724 - Oracle 10.2 Extended Support free until July 31, 2011

Heterogeneous Environment - DBCI on unix and Apps on Windows or Linux

Check these notes for further information:
1067221 - Composite note for heterogeneous installation
531069 - Heterogeneous Unix - Unix Systems

CIFS CONFIGURATION ON HPUX.

1. Configured Samba configuration files.
cd /etc/opt/samba
vi smb.conf

Change below lines

Enter as per your requirement
workgroup = HPUXSERVER

remove comment and change as per requirement
netbios name = tstmig

go to shared directory settings and configured as per your requirement.

[homes]
comment = Home Directories
path = /home/%U
browseable = yes
writable = yes
create mask = 0700
directory mask = 0700

2. Add user into samba user ( this user should be created in operating system before creating here )
# /opt/samba/bin/smbpasswd -a ituser
New SMB password:
Retype new SMB password:
Added user ituser.

Password = ituser123

3. Start / stop samba server
/opt/samba/bin/startsmb
/opt/samba/bin/stopsmb

4. Accessing HPUX server and samba directory from windows.
\\10.32.1.30\homes
\\10.32.1.30\ -> in this case it prompt for username and password, specify username and password which created in step 2

5. As per my requirement I shared directory with below details.
Reason for 777 is samba user can able to add, modify and remove files.
Reason for force user and group is the files are transfer here is going to be used by SAP application server hence owner should be adm.

[dataupload]
comment = data upload directories
path = /home/dataupload
browseable = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = pipadm
force group = sapsys
valid users = ituser

6. Configuring Automatic Start at System Boot
When the HP CIFS Server is first installed, it will not automatically start when the system boots.
You can enable the HP CIFS Server and related daemons to do so by editing the
/etc/rc.config.d/samba file.This configuration file contains two variables:
RUN_SAMBA=0
RUN_WINBIND=0

The RUN_SAMBA variable controls whether HP CIFS Server daemons, smbd and nmbd, will start at system startup. The RUN_WINBIND variable controls whether the winbind daemon, winbindd, will start at system startup. The two variables function independently.

To configure HP CIFS Server to start automatically, set RUN_SAMBA to a non-zero value. To configure Winbind to start automatically, set RUN_WINBIND to a non-zero value. For example,
if you want HP CIFS Server and Winbind to start automatically at system startup, edit the
variables in the /etc/rc.config.d/samba file as follows:

RUN_SAMBA=1
RUN_WINBIND=1


7. Other Sambha validation parameters
valid users = %S
• hosts allow
• hosts deny
• hosts equiv
• preload modules
• wins server
• vfs objects
• idmap backend
netbios aliases
• interfaces
• auth methods
• passdb backend
• invalid users
• valid users
• admin users
• read list
• write list
• printer admin

APA CONFIGURATION ON HPUX

1. Login with management console.
2. Start smh
Choose Networking and communication.
3. Choose network interface configuration
4. Choose network interface card
Check both network card should not contain any ip address.
Select network card and press enter.
On this card ip address already configured.
Press Cntrl o – Other Actions.
Choose D-Delete IP
Select delete again.
5. Choose Auto port Aggregation
6. Choose c - create link aggregate.
7. Select Mode = LACP_AUTO and choose both network card and select OK.
Click on OK
8. Now you get aggregated network interface name.
9. Press Enter and assign IP address and other details.
Choose p – View / Modify IP Attributes