I have a SQL Server 2012 database running on amazon EC2. I've created a user to be able to create, edit and drop databases. I gave the new user with
dbcreator server role.
My user can connect remotely and successfully runs the
create database foo; command. But when the user attempts to drop the database again with
drop database foo; the command fails with the following error:
Warning: Fatal error 615 occurred at Feb 1 2014 5:15PM. Note the error and time, and contact your system administrator. ErrorCode: 21
Even though the selected database is
master (so I don't think it's because it's in use). And the command succeeds when I run it again logged in as an administrative user.
I checked the newly created database, and my user has been assigned the
db_owner role in the database as I expected so my understanding is that this should be sufficient permissions for that user to be able to drop the database they just created.
According to http://technet.microsoft.com/en-us/library/ms178613.aspx the db_owner role should be sufficient permissions. "Requires the CONTROL permission on the database, or ALTER ANY DATABASE permission, or membership in the db_owner fixed database role."
I've looked up error 615 and found "Could not find database table ID %d, name '%.*ls'." which makes no sense to me. http://technet.microsoft.com/en-us/library/aa937592(v=sql.80).aspx
Sql server version info:
Microsoft SQL Server 2012 (SP1) - 11.0.3368.0 (X64) /n May 22 2013 17:10:44 /n Copyright (c) Microsoft Corporation/n Express Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)/n - from