SAP Basis snippets #7

How to unlock DDIC user

Have you ever locked DDIC user and pondered how to unlock it? Well, today let’s see how we unlock DDIC user using sap* user.

There exists a parameter login/no_automatic_user_sapstar inside the default profile of your sap system. If it doesn’t exist, we need to add this parameter to perform what we are discussing today.

In some cases, this parameter exists in instance profile too, depending on the system.

This parameter may be set to either 1 or 0.

If it is set to 1, it means that we won’t be able to login to sap system using password pass of sap* user.

So now coming to the point, let’s say we locked the DDIC user. To unlock it we are going to use sap* user.

The first step is to set the parameter login/no_automatic_user_sapstar = 0 in default profile. Set this parameter to zero in instance profile too, if this parameter exists.

Next step is to delete the existing sap* user in usr02 table.

For this connect to SQL with system database as follows.

sqlplus "/as sysdba"

To check if the sap* user exists in the table we execute the following command.

select * from <db_schema>.USR02 where MANDT='000' and BNAME='SAP*'

Here we have to pass the required client to MANDT parameter and SAP* user to BNAME parameter. Enter your database schema in place of <db_schema>

Now we delete the sap* user, if it exists, using the command

delete from <db_schema>.USR02 where MANDT='000' and BNAME='SAP*'

After this confirm by again running the command;

select * from <db_schema>.USR02 where MANDT='000' and BNAME='SAP*'

Now you will be able to login to sap* user using the password pass.

Once logged in go to su01 t-code and reset the DDIC user password, thereby unlocking it.

Hope you found the post useful. Please keep an eye on this page for more such posts. Thank you!! 😊

Did you find this article valuable?

Support Ashwin Sharma P by becoming a sponsor. Any amount is appreciated!