Home » DB2

Category Archives: DB2

Un-officially SAP OSDB Migration Project done !!


Another project have been completed by me this year.

Since the sister company (formerly I maintain) moved to hyperconverged Nutanix and used Acropolis as its hypervisor, there is a SAP R / 3 4.7 ext 200 system running on HP rx4640 machine with HPUX 11.23 OS and Oracle 9.2 database server that must be migrated to a Nutanix machine . HP rx4640 machine is not extended maintenance support. While the system, SAP R / 3 4.7 ext 200 is also not supported by SAP both SAP instance and database server.

Target using Linux OS SLES 11 SP4 and DB2 database server 9.7 FP 5.

Broadly speaking the migration process is :

    – Export existing data in SAP R / 3 4.7 ext 200 on HPUX source machine
Install DB2 9.7 database server on target Linux
Install Central Instance on Linux target
Install Database instance in Linux target by selecting System Copy and export result (process no.1) as imported data.

The export process runs smoothly. Problems begin to emerge during process no.4 of them:

The process of database load had stopped because the file system is full sapdata. Solution: extend the sapdata partition and the file system
The database load process was stopped again because the file system is a full archive log. Solution: extend the partition and add the number of LOGARCHIVE second files.

After the import process is complete, there are still more problems that arise, the SAP kernel 6.40 used does not recognize the linux 3.0 kernel (used SLES 11 SP 4) and DB2 9.7 database. The solution is download the latest version of SAP kernel 6.40 EX2 patch (version 414).

Project un-official SAP OSDB migration done by un-certified Base like me

Installation SAP NetWeaver 7.4 using DB2 10.5 FP 3 on SLES 11 SP 4


Hi,

Lately I have upload some video on how to install SAP NetWeaver 7.4. I am using DB2 10.5 FP 3 as database server and using SuSE Linux Enterprise Server 11 SP 4.

Preparation check before installation.

Installation video.

part 1

part 2

Enjoy !!

Video Step by step upgrade SLES 11 SP 4 (with SAP ERP 6 EHp 5) to SLES 12


This video show you on how to step by step upgrade SuSE Linux Enterprise Server 11 SP 4 (with SAP ERP 6 EHp 5 on it) to SuSE Linux Enterprise Server 12.

There are few problems especially on uuidd (UUID daemon) and libuuid1 but it all solved. You can check it out.

Happy watching !!

 

Video Upgrade SLES 11 SP 2 with SAP ERP 6 EHp 5 to SLES 11 SP4


I have installed SAP ERP 6 EHp 5 on SuSE Linux Enterprise Server SP 2. Then I need to upgrade my OS from SLES 11 SP 2 to the latest version of SLES 11, which is SLES 11 SP 4.

Here are the video.

Enjoy !!

Slideshow Video – Step by Step on How to Install SAP NetWeaver 7 EHp 2 Process Integration


I also have uploade a brand new slideshow video on step by step on how to install SAP NetWeaver 7 EHp 2 Process Integration (formerly known as SAP Exchange Infrastructure a.k.a SAP XI).

It’s really easy to follow.

Happy watching and enjoy !!

Slideshow Video – Step by Step on How to Install SAP NetWeaver 7 EHp 2 Mobile Infrastructure


Recently, I have uploaded a new slideshow video about how to install SAP NetWeaver 7 EHp 2 Mobile Infrastructure. You can check it out here on youtube link (

).

Happy watching, guys !!

Different methods to Lock or unlock SAP users


I want to lock all the users in SAP during MTP.  I know using SU10 we can do it. Any other alternative ways to lock the users.

Is there a way in SAP to unlock a locked user for a limited time, then automatically after x time set the user back to lock status? 

You can fill in “valid from” and “valid until”, but you cannot say from Monday to Friday from 8 – 12:00 for part time workers. 

Can we schedule to lock all users?

If users get locked, from SU01 you can unlock them. 

Use SU10 to mass lock/unlock the users.

Use address data or authorisation data to get a list of users – select the ones you want and 

click transfer. 

Once this is done click on lock or unlock. 

You can also use transaction code EWZ5 to mass lock/unlock the users

or 

Execute program EWULKUSR in SE38

or 

Set a profile parameter (login/failed_user_auto_unlock) to unlock at midnight the locked users. 

or 

Here’s an ABAP code, short and simple, isn’t it? 

REPORT zreusrlock. 

DATA: time_limit TYPE sy-datum. 
DATA: days TYPE i VALUE 40. 

time_limit = sy-datum – days. 
UPDATE usr02 SET uflag = 64 WHERE trdat < time_limit.

If you don’t want to specify the time in the program, you can use SE38 to schedule it as a daily background job with the date and time.

or

Probably the easiest way would be to write a sqlplus SQL script that sets all the UFLAG fields in table USR02 to 64 EXCEPT for the BNAMEs you don’t want locked. When you are done, you can do the same again but change the UFLAG field to 0. 

The SQL statement would look like: 

update SAPR3.USR02 set UFLAG = 64 where MANDT = <client number> and BNAME != <don’t lock user 1> 
AND BNAME != <don’t lock user 2>; 

You can replace != with <> if you want. To run this from an OS command line, you would type: 

Unix/Oracle 8—> sqlplus internal @<SQLpath+SQLname> 
NT/Oracle 8.0—> plus80 internal @<SQLpath+SQLname> 
NT/Oracle 8.1—> sqlplus internal @s<SQLpath+SQLname> 
Unix/Oracle 9:–> sqlplus /nolog @<SQLpath+SQLname> 
NT/Oracle 9—–> sqlplus /nolog @<SQLpath+SQLname> 

In UNIX you can cron the script to schedule it. In NT you can schedule it as a task.

or

This is another method to UNLOCK ALL users. 

Start Oracle Server manager (I assume you are on Oracle) 
connect internal 
update sapr3.usr02 set uflag=’0′ where mandt=’399′; 

When users are locked, the uflag is set to 64. 

Finish, just query to check. 

select bname, uflag from sapr3.usr02 where mandt=’399′; 

Please note that unlocking users from low level (like Oracle sqlplus) should be used as last resort. Frequent use of low level access may tempt you to use on other things. Highly dangerous and your IS auditors will not be too happy. 

Is there a way to set a list of users that cannot be locked, even if we try to lock them manually, and even if they fail connection ( wrong password )?

Increase this parameter in SAP Instance profile: 

login/fails_to_user_lock = 6 (max is 99 wrong attempts, i.e, value 99). Currently you have a value of 3. 

login/failed_user_auto_unlock (for your midnight unlocking). 

Ask users to remember passwords!! If someone is deliberately login-in with different username/password (thereby blocking legitimate access of that user), check hostname from SM21. 

This is considered as DoS (Denial of Service).