cancel
Showing results for 
Search instead for 
Did you mean: 

How to unlock users in a SAP system if all of them are locked

Former Member
0 Kudos

How to unlock users in a SAP system if all of them are locked

Posted: Mar 21, 2007 10:07 AM Reply E-mail this post

Hello Experts,

In any SAP System,if a user having authorizations has mistakingly locked all the users of the SAP system,then how wll we unlock those users bcoz we wont be able to logon into the SAP System. Requested to revert your valuable replies at earliest.This happened with us,how to resolve it.My Email Id is rechme.saumya@gmail.com .

Regards,

Saumya

Accepted Solutions (0)

Answers (5)

Answers (5)

debasissahoo
Active Contributor
0 Kudos

Hi Saumya,

Follow the link

this might be useful.

Thanks,

Debasis.

Former Member
0 Kudos

Guys,

Use tcode EWZ5 and select all the users, there is option to select all in the tcode screen and hit unlock.

You can use this tcode to both lock and unlock all or some users.

Hope this helps.

0 Kudos

You can also update the table with abap by logging in to another client and using the CLIENT SPECIFIED option.

Former Member
0 Kudos

Hi Somya,

i guess u have locked all users including sap* and logged out. ie., no more login with sap* also.

in this case,

goto DB level and delete sap* user.

and try to login sap* with default password.

then unlock all users.

it will work shure.

Cheers,

Siva

Former Member
0 Kudos

Hello Siva And Manas,

Thanx for ur replies .

Manas: These SQL statements we hv to run at the Command Prompt level only na.......

Siva : U r telling to delete the SAP* user ,u dont mean with the System created default user SAP* rite but u mean to delete our self created SAP*/any super user rite? Secondly how to delete tat user at the database level?

Regards,

Saumya

If all the users are locked , they can only be unlocked via sql.

Actually waht happens is if the uflag field of an user in table usr02 is 0 then the user is unlocked. Different values of the uflag field in table USR02 mean:

0 User not locked

32 Locked by CUA central administrator

64 Locked by administrator

128 Locked after failed logon

Incase all the users are locked execute the following sql to unlock them

update sap<sid>.usr02 (means update sapd01.usr02 or sapq01.usr02 etc)

set uflag='0' ;

commit.;

This unlocks all the users.

update sap<sid>.usr02

set uflag='0' where bname='xxx';

commit.;

This unlocksonly the user xxx.

Former Member
0 Kudos

Hello Manas and siva,

R u reverting back to the queries so tat i can reward u with points.

regards,

saumya

Former Member
0 Kudos

Regarding my suggestion,

This is an sqlplus statement and u have to run in sqlplus mode.

Run the command mode

Execute the following:

sqlplus /nolog

conn /as sysdba

This connects you to the sqlprompt.

sqlplus> here execute the sql commands for unlocking.

As the data has to be modified in the database we hav to login to the database.

Regards

Former Member
0 Kudos

Hi Somya,

iam telling to delete sap* default created by system. not to remove self created super user.

and what data base ru using ?

Cheers,

Siva

Former Member
0 Kudos

Hello Somya

We r hv insatlled SAP over Oracle database.

Regards,

Somya

Former Member
0 Kudos

Hi Somya,

DROP USER <username> to delete user in Oracle.

Cheers,

Siva

Former Member
0 Kudos

Hi,

If all the users are locked , they can only be unlocked via sql.

Actually waht happens is if the uflag field of an user in table usr02 is 0 then the user is unlocked. Different values of the uflag field in table USR02 mean:

0 User not locked

32 Locked by CUA central administrator

64 Locked by administrator

128 Locked after failed logon

Incase all the users are locked execute the following sql to unlock them

update sap<sid>.usr02 (means update sapd01.usr02 or sapq01.usr02 etc)

set uflag='0' where mandt=<client no>;

commit.;

This unlocks all the users.

update sap<sid>.usr02

set uflag='0' where bname='xxx' and mandt=<client>;

commit.;

This unlocksonly the user xxx.

This will resolve your problem.

Pl dont forget to award points.

Regards