Rename database permission problem with role db_owner

  • What permission do I have to grant to a user to rename a specific database? ALTER is not sufficient:

    What works for a user textxg (no priviledged server roles, only create any database permission)

    create database dbtestxg

    alter database dbtestxg modify name = dbtestxg2

    which is fine as sys.fn_my_permissions(null,'database') returns an ALTER permission.

    But if I have a database xyz that has not been created by testxg but where I have added testxg to the db_owner role, the alter database modify name fails with error 5011 ("User does not have permission to alter database 'xyz', the database does not exist, or the database is not in a state that allows access checks.").

    Which is strange because according to sys.fn_my_permissions(null,'database') the user has ALTER database permission, which should be sufficient according to http://msdn.microsoft.com/en-us/library/ms345378.aspx. In fact the user has almost the same permissions as in dbtestxg (with one strange exception, CREATE DATABASE, which can be granted only for the master database...).

Viewing 0 posts

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