Unlock users from database – What am I missing?

We often use Database to unlock users from table USR02. It is arguably an easy task but we often get struck with a missing comma, wrong user etc…

Below, I am trying to put this magic statement for all the Databases in a table to make life easy.

I have used example user “SAPUSER” and client “000”. Do not forget to replace these and the relevant schema with your requirement.

Logged on users are also examples and you should be able to user any user with similar authorizations.

Database Logged in User Unlock Statement Check/Select statement
Oracle SYS/SYSTEM update SAPSR3.USR02 set UFLAG=0 where BNAME=’SAPUSER’ and MANDT=000; select UFLAG from SAPSR3.USR02 where BNAME=’SAPUSER’ and MANDT=000;
DB2/DB6 db2<sid> [OS Authentication] update SAP<SID>.USR02 set UFLAG=0 where BNAME=’SAPUSER’ and MANDT=000 select UFLAG from SAP<SID>.USR02 where BNAME=’SAPUSER’ and MANDT=000
SAP HANA sap<sid> Update sap<sid>.USR02 set UFLAG=’0’ WHERE BNAME=’SAPUSER’ AND MANDT=’000’ select UFLAG from SAP<SID>.USR02 where BNAME=’SAPUSER’ and MANDT=000
MaxDB sap<sid> UPDATE usr02 SET UFLAG=0 where MANDT=000 and BNAME=’SAPUSER’ select UFLAG from usr02 where MANDT=000 and BNAME=’SAPUSER’
MS SQL <sid>adm /sa [OS Authentication] update <SID>.USR02 set UFLAG=0 where BNAME=’SAPUSER’ and MANDT=’000′; select UFLAG from <SID>.USR02 where MANDT=000 and BNAME=’SAPUSER’
SAP/Sybase ASE sa update USR02 set UFLAG=0 where BNAME=’SAPUSER’ and MANDT=’000′ select UFLAG from USR02 where BNAME =’SAPUSER’ and MANDT=’000′

 

Advertisements

2 thoughts on “Unlock users from database – What am I missing?

  1. Hi,

    Thanks for the article.
    Could you give more information for this theme? For example, how to develop the regulation in the SAP GRC System?

    Thanks and GOOD LUCK with this blog!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s