Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Delete User Error

Posted on by 100

Hi All,

I'm unable to delete a user from SL 2018. Here's the error...

pastedimage1620935352960v1.png

Thanks.

  • Verified answer
    Ed-DBA Profile Picture
    Ed-DBA 100 on at
    RE: Delete User Error

    Excellent suggestion. Thanks again.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Delete User Error

    I would definitely backup the databases first.  Depending on the severity of failure, you could restore the backups to a new name, script out the failing object as "alter", then run the script in the production system (either application or system database.) If all else fails, restore the databases under the original name and move forward.

  • Ed-DBA Profile Picture
    Ed-DBA 100 on at
    RE: Delete User Error

    Good morning Stuart,

    From what I could tell in our databases, the customized objects have "x_" prefix in the object name (e.g. x_CustomObject). I don't know if any of the stock objects were edited or modified. I guess I could backup the databases before running the "Execute Master Indexes, Views and Stored Procedures" and restore the system and application databases if we experience failure in testing - which must be extremely thorough. Would you agree?

    Thank you very much Stuart.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Delete User Error

    Good morning, Ed.  I'm going to reply to both of your most recent questions. First, it will affect both system and application databases.

    My experience has been if the views, indexes, procs are COMPLETELY custom (in other words, they were added to existing "stock" objects) the "Execute Master Indexes, Views and Stored Procedures" process will not affect them.

    On the othe hand, if by custom you mean that the stock versions were edited, then the process will overwrite and remove any customizations.

  • Ed-DBA Profile Picture
    Ed-DBA 100 on at
    RE: Delete User Error

    Will running the "Execute Master Indexes, Views and Stored Procedures" in Database Maintenance wipe out all the customized objects (views, stored procs) in the user/application databases? Thanks.

  • Ed-DBA Profile Picture
    Ed-DBA 100 on at
    RE: Delete User Error

    Stuart, yes found it there on the app server under the Administrative Tools.

    Do you know if "Execute Master Indexes, Views and Stored Procedures" only updates the system database or does it update the application databases as well? I guess it's best to backup all the databases before running the update.

    Thanks again Stuart.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Delete User Error

    Ed, are you sure it's not on the app server? It would be listed under Windows Administrative Tools.

  • Ed-DBA Profile Picture
    Ed-DBA 100 on at
    RE: Delete User Error

    Stuart, I launched the MS Dynamics SL Database Maintenance (this app does not exist on the app server running Dynamics) and I'm getting the message below...any idea? Thanks.

    pastedimage1621016310129v1.png

  • Ed-DBA Profile Picture
    Ed-DBA 100 on at
    RE: Delete User Error

    I will give that a try. Thank you Stuart.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Delete User Error

    Ed, it looks like you're missing the primary index on the <systemdatabase>.UserRec table. I'd be wondering if there weren't other indexes missing. You could try running the Database Maintenance\Execute Master  Indexes, Views and Stored Procedures process. 

    pastedimage1620936785727v1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans