HOW TO MASS LOCK USER with SQL COMMAND


Execute this SQL command
  • update SID.USR02 set UFLAG=64 where MANDT='110' and BNAME != 'SAP*';    
  • Explain : UFLAG=64 means lock
  • BNAME !='SAP*' means lock everyone except SAP*

Alternately, try the below SQL command:

use HRS
UPDATE [hrs].[USR02]
SET UFLAG = '64'
WHERE (UFLAG = '0') 
AND NOT (BNAME like 'SAP%' OR BNAME = 'DDIC' OR BNAME = 'TMSADM' 
         OR BNAME like 'J2EE%' OR BNAME like 'SLD%' OR BNAME = 'JCO_DATA'
         OR BNAME = 'BASIS_ADMIN')

Popular posts from this blog

HOW TO SAP - Create RFC TCPIP connection and Register Server Program with RFCEXEC

Step by step to create new job using SM36

HOW TO SAP - SAP Web dispatcher Installation