question

roneri75 avatar image
roneri75 asked

Not db_owner when creating database SQL 2016

I have a program where you can create new versions, which creates a copy of the current database and restore it as new database and i need the user to be db_owner on the new database. In ealier version of SQL as 2012 and 2014, when u create a database, the user that creates the database get set a db_owner if the user has the dbcreator fixed server role but in Sql 2016 the user does not get the databas role db_owner. Does anyone know how to solve that without giving the user sysadmin fixed server role?
create databasedatabase-roles
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.