CREATE DATABASE permission denied in database 'master' I've developed a desktop application using WPF and Entity Framework code-first.

In my application the user can create multiple databases at run-time.

But Entity Framework can't create database if the user isn't admin on his machine.

I need to find a solution that could be done with coding. Management Studio is not installed on the user's machine.

What do you suggest?
You need to execute this T-SQL command using an account that does have administrative rights, such as sa:

USE master;
EXECUTE sp_addsrvrolemember @loginame = N'YourAppUserLogin', @rolename = N'dbcreator';


Replace YourAppUserLogin with the login the application user uses to connect to the database.