modify user-defined role name

  • Hi all,

    is there anyway to modify a user-defined database role name.

    May be through system tables or stored procedure?

    Thanks

  • sp_configure 'allow_updates', 1

    go

    reconfigure with override

    go

    update sysusers

    set name = 'MyNewRole'

    where name = 'MyRole'

    go

    sp_configure 'allow_updates', 0

    go

    reconfigure with override

  • it did work perfectly.

    Thanks Steve

  • I am using sql server 2005 and I get an error message while trying to run this update command saying "Ad hoc updates to system catalogs are not allowed."

    Warm regards,

    Sudhir

  • May work differently in SQL Server 2005. Sorry, in the middle of a workstation switch and ss2k5 isnt set up yet

    You might be able to rename the role in SS2K5 directly. Or in the properties for the role. If not, look for a server setting that allows updates or system changes.

  • In SQL2000 the store procedure works perfectly, besides you can change it in system tables directly.

    I think in 2005 it would have to work the same way.

Viewing 6 posts - 1 through 5 (of 5 total)

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