locked
Can't create database as copy RRS feed

  • Question

  • Hello, I created a new user specifically for creating database copies. This user is a member of db_owner role of the source database as well as dbmanager of the server. I'm trying to copy the database in the same server using the statement in the master database:

    CREATE DATABASE MyDBCopy AS COPY OF MyDB

    The statement results in the error:

    Msg 262, Level 16, State 1, Line 1

    CREATE DATABASE permission denied in database 'MyDB'.

    According to this article i'm fulfilling all the permissions requirements. What am I missing?

    Friday, July 13, 2012 8:57 PM

Answers

  • Hi Jonas,

    The new user can't copy databases, only the login that created the database can.

    Like SQL Server, you can create additional users inside the database in SQL Database and add them to the db_owner database-level role. These additional users can be linked to a login other than the login that created the database initially. However, these additional users cannot perform a database copy.


    If you found this post useful, Please "Mark as Answer" or "Vote as Helpful". Best Regards.

    Saturday, July 14, 2012 3:06 PM

All replies