Unlocking SAP User from Database

This post is meant for people who are new to SAP administration. It will teach you how to unlock a user by altering the table field where the user's lock status is stored.

Since the lock status of a user is persisted at the database level. One can unlock (or lock) a user using SQL commands or using transaction SE16. If you intend to use the SQL methods, please ensure that it is done on DEV/QA systems and you are not violating your company's security policies.

The lock status is stored in the field uflag in the table usr02. If uflag is 128, the user is locked. By changing it to 0, you will be able to unlock it.

Here is an example to unlock the user DDIC in client 000:
UPDATE sapr3.usr02 SET uflag = 0 WHERE bname = 'DDIC' AND mandt = '000';
commit
This technique is useful when you need a mass lock/unlock of users. 

Comments

Popular posts from this blog

OS/DB Migration - CMD. STR, TOC, EXT, R3load, DDLDBS.TPL and more

Fixing Inconsistent Table - Table activation fails due to inconsistency between DD and DB

301 Redirect Using SAP Web Dispatcher