In Microsoft SQL Server 2017+ I would like to grant the dbcreator role on a single user but only allow her to create databases whose name matches a fixed prefix.
Is it possible to do this at the database level using a built-in feature or a stored procedure?
Best Answer
You can use a server level trigger like this:
Or at the database level like this: