Skip to Content
Author's profile photo Former Member

How to unlock SAP* user in Ms SQL database

Whenever SAP* user got locked (mainly in 000 Client), in most cases we are supposed to unlock the SAP* User in database level.

Before logging into SAP system using SAP* user, be aware whether the parameter login/no_automatic_user_sapstar is set to value 0 (Zero).

If the value of parameter login/no_automatic_user_sapstar is set to 1, it will not allow the SAP* user to login to the SAP system.

Untitled.jpg

Steps to Unlock the SAP* user (DB level)

1. Try login SAP system with SAP* user

/wp-content/uploads/2013/09/2_272128.jpg

    SAP* user got locked due to too many attempts with wrong password.

2. Login to Ms SQL Database,

3. Execute the query:

   

     select * from er1.USR02

/wp-content/uploads/2013/09/4_272135.jpg

    The status of the user is locked/Not locked is identified in the field UFLAG.

    In the above screenshot, value of UFLAG is 128 for the user SAP*, means the SAP* user got locked.

    Note : If the value of UFLAG results in a Non-Zero value, then it means that the user got locked.

4. Execute the query: 

     select * from er1.USR02 where BNAME=‘SAP*’ and MANDT=‘000’ to find the details of only SAP* user.

/wp-content/uploads/2013/09/31_272139.jpg

    For Unlocking the user, the value of UFLAG should be set to 0 (Zero).

5. Execute the query: 

    update er1.USR02 set UFLAG=‘0’ where BNAME=‘SAP*’ and MANDT=‘000’

/wp-content/uploads/2013/09/51_272140.jpg

6. Now execute the query : 

    select * from er1.USR02 where BNAME=‘SAP*’ and MANDT=‘000’

/wp-content/uploads/2013/09/6_272146.jpg

    Now the Value of UFLAG has been altered to 0.

   

/wp-content/uploads/2013/09/last_272186.jpg

    SAP* user has been unlocked.

==========================================================

Assigned tags

      14 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Eduardo Rezende
      Eduardo Rezende

      Hi Dino,

      Nice document. Very detailed!

      Regards,

      Eduardo

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks a Lot Eduardo Rezende 🙂

      Warm Regards,

      Dino

      Author's profile photo S Sriram
      S Sriram

      Hi

      Good one 😎

      Thanks

      Ram

      Author's profile photo Nicolas VANDER AUWERA
      Nicolas VANDER AUWERA

      Bookmarked and liked !

      Author's profile photo Former Member
      Former Member

      thanks Dino, you did a grate Job 😉

      Author's profile photo Former Member
      Former Member

      kindly confirm if i follow the above procedure do i need to restart the system.

      Author's profile photo Gaurav Rana
      Gaurav Rana

      Hi Aravind,

      No need to restart the system.

      Author's profile photo Former Member
      Former Member

      thanks gaurav

      Author's profile photo Former Member
      Former Member

      Thanks for sharing the procedure

      Author's profile photo Former Member
      Former Member

      eXcellent documentation, thanks a lot.

      Author's profile photo Former Member
      Former Member

      Can any1 explain for Oracle database in Windows environment..???

      Regards,

      Javed

      Author's profile photo Luis Darui
      Luis Darui

      Hi Javed, you should seek similar information in the following space:

      SAP on Oracle

      I don't work with Oracle but it seems to me that the tables are the same, so you would need to use sqlplus or other Oracle tool to connect to DB.

      Author's profile photo Joshua Lacroix
      Joshua Lacroix

      Google it, Ive done it tons of times on Oracle, its very common on many sites.

      Author's profile photo Arun Jacob
      Arun Jacob

      Thanks Dino, this was really helpful.