Modify sysmembers table?

  • The question I have is regarding modification of the table sysmembers.  This is basically a child table of sysusers that maps users to their respective roles.

    The table sysusers is editable, and is able to be copied and restored over itself to migrate or maintain database users in a db, but it doesn't appear that the sysmembers table can be modified at all.  This poses a problem only in that this table will be left with orphan relationships when the sysusers table is modified or overwritten...

    Is there a way to modify this table back-door, or is the best bet to create a script to temporarily create users for the orphaned uids, sp_droprolemember, and then drop the user again?

    Thanks in advance for any insight.

    -Allen Krehbiel

  • "The table sysusers is editable"

    Only because you've enabled updates to system tables.  Generally, you should not be updating system tables directly.  If you are looking for a way to move or restore users, I would recommend scripting out your existing users and using the scripts to restore or move users.  The last thing you want to do is get into the habit of 'back-door'ing data in the system tables.  There is a way to accomplish any task without having to resort to direct updates to the system tables.  So my recommendation for you would be to re-think how you are maintaining your users.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply