Permission on sp_detach_db

  • I create a login with role database creater but it can not detach a database. Why? While executing sp_detach_db I got the error "User 'xxx' does not have permission to run DBCC DETACHDB.". So what kind of permission should I grant to this login? Actualy what I want to do is let it can just attach and detach a specific database, no other operations allowed. Is it possible to do that? Thanks.

  • -- BOL --

    Permissions

    Only members of the sysadmin fixed server role can execute sp_detach_db.

    -- End BOL --

    BOL is your friend, many words of wisdom can be found there.

    =;o)

    /Kenneth

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

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