cancel
Showing results for 
Search instead for 
Did you mean: 

All User Locked

Former Member
0 Kudos

Hi SAP DBA,

I used Tcode SU10 to lock all user, I forget to exclude Basis and SAP* and locked all user, Now, Please help me how to unlock all users.

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can unlock the users at DB level.

When you lock the user, UFLAG status set to 64 in USR02 table.

just issue the below SQL command.

For example your client is 300

UPDATE SAPSR3.USR02 SET UFLAG='0' WHERE MANDT = '300';

It will unlock all users.

Regards.

Rajesh Narkhede

Former Member
0 Kudos

Hi Rajesh,

Thanks for reply. I followed these step to do so.

opened MS SQL 5 Studio,

New Query -


> select DEV DB -


write a command

select * from usr02

Error : Invalid object name 'usr02'.

Please guide me what is wrong?

Regards,

Vijay Angrish

Former Member
0 Kudos

Hi,

select * from usr02

Above query is incorrect...

Correct syntax would be..

select * from <sapschema>.usr02 where bname = <username> and mandt = <client_no>;

Where <sapschema>.usr02 is table where user details are stored.

BNAME = Username

MANDT = Client No.

Usually SAPSCHEMA is SAPSR3. So tablename would be "sapsr3.usr02" not only "usr02".

Remember it object names are case sensetive, so try with caps and small letters.

Regards.

Rajesh Narkhede

Former Member
0 Kudos

Hi Rajesh

Thanks instant reply.

I tried select * from SAPSR3.USR02 where BNAME = 'basis' and MANDT = '333'

but there is same error

Msg 208, Level 16, State 1, Line 1

Invalid object name 'SAPSR3.USR02'.

I tried in lower case too..

Regards,

Vijay

Former Member
0 Kudos

Try select * from dev.usr02 where mandt='333' and bname='<User>';

dev is in this case your DB SID. (if it is a different one, adjust it accordingly - also compare to this post [SDN post|😉

The syntax stated above is correct for an Oracle DB.

Former Member
0 Kudos

Before using the query, make sure you've select appropriate database in your SQL management studio (Drop Down in left corner of the screen inside management studio).

Best Regards,

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

you can unlock the user with the SQL command :

update <sid>.USR02 set UFLAG=0 where BNAME='SAP*' and MANDT=xxx

If you want to reset SAP*, you can use the command :

delete from <sid>.USR02 where BNAME='SAP*' and MANDT='xxx'

Laszlo

Edited by: Laszlo Hausman on Jul 12, 2010 10:00 AM

Former Member
0 Kudos

Thanks Laszlo Hausman,

It helped and got sap* unlocked.

Best regards.

Mohammad

Former Member
0 Kudos

Delete the user SAP* from the DB level and set the following parameter in the instance's profile:

login/no_automatic_user_sapstar = 0

Afterwards restart the instance and log in with the user SAP* and its default password. With that user you can undo the lock on the required users.