Skip to Content

Long running time during batch delete user in SU10

Dear all,

I'm just trying to remove all users within client 800 in our IDES system, approximately 8000 users.

The problem is it took really long time to remove users. I select 5000 users to be deleted however 24 hours have been past, still there are about 1000 users waiting to be deleted.

Is it normal that SU10 always took long time to batch delete users? I checked my instance profile, it seems large enough regarding memory part.

Thank you so much.

Best regards,

Freshman

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Dec 18, 2012 at 04:54 AM

    Hi B A,

    You can try to delete thorugh Database level.

    Which database using?

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 02, 2013 at 05:28 PM

    Hello

    Are you deleting the users just because you are not going to use the client 800 anymore ?

    In that case you delete the client.

    Delete the users from the DB level is not a good choice as it is not recommended unless it is an SAP* user.

    USR02 is not the only table that contains the user related data.

    Check this link.

    http://wiki.sdn.sap.com/wiki/display/Security/Collection+of+SAP+Security+Tables

    Moreover the above suggested delete statements are incorrect.

    If you want to delete the users of client 800 then you need to specify the client (MANDT) as well in the delete statement. Else you will end up deleting all the users (all clients) in the system.

    Eg:

    DELETE FROM SAPR3.USR02 WHERE MANDT=800;

    COMMIT;

    But if you dont want to retain any of the users from the system then the best option is to do a TRUNCATE.

    Remember this will delete all the users and the TMS will be inconsistent as the TMSADM user will be delete.

    Also those actions will only delete the entries from the USR02 hence there will be orphaned entries in the other tables related to the SAP Security Tables

    I personally will not recommend these options.

    If you want to get rid off all the users on client 800 then I suggest you to perform a local client copy of the users from another client where there are less users.

    Cheers

    RB

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I had same issue..I used SAP GUiscript below. Create a xls file with first column as userid and save it to C:\USERLIST.XLS and run this scipt. All ids in your spreadsheet will be deleted one by one. This is much faster that SU10:

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

      If Not IsObject(application) Then

         Set SapGuiAuto  = GetObject("SAPGUI")

         Set application = SapGuiAuto.GetScriptingEngine

      End If

      If Not IsObject(connection) Then

         Set connection = application.Children(0)

      End If

      If Not IsObject(session) Then

         Set session    = connection.Children(0)

      End If

      If IsObject(WScript) Then

         WScript.ConnectObject session,     "on"

         WScript.ConnectObject application, "on"

      End If

      session.findById("wnd[0]").maximize

      '****************************************

      '=========Connection to Excel Sheet==============

      'EXCEL File has to be open to read data

      Dim objExcel

      Dim objSheet, intRow, i

      Set objExcel = CreateObject("Excel.Application")

      Set objWorkbook = objExcel.Workbooks.Open _

          ("C:\UserList.xls")

      intRow = 2 'skip first record

      '===========END BOILERPLATE=====================

      On Error Resume Next

      Do Until objExcel.Cells(intRow,1).Value = ""

       

                strUserId = Trim(CStr(objExcel.Cells(intRow,1).Value)) 'column1 = Userid

                'msgbox(strUserid & " " & strpassword)

                '========Place recorded part here =========================

      session.findById("wnd[0]").maximize

      session.findById("wnd[0]/tbar[0]/okcd").text = "/nsu01"

      session.findById("wnd[0]").sendVKey 0

      session.findById("wnd[0]/usr/ctxtSUID_ST_BNAME-BNAME").text = strUserId

      session.findById("wnd[0]/tbar[1]/btn[14]").press

      session.findById("wnd[1]/usr/btnBUTTON_1").press

      '============================================================

      intRow = intRow + 1

      Loop

      objExcel.Quit

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

  • avatar image
    Former Member
    Jan 03, 2013 at 07:52 PM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded