How to setup Database Permissions on SqlServer Express 2008

Posted by Timo Willemsen on Server Fault See other posts from Server Fault or by Timo Willemsen
Published on 2011-10-05T12:48:15Z Indexed on 2014/06/08 15:30 UTC
Read the original article Hit count: 276

Filed under:
|
|

I'm using a code-first approach of using the Entity Framework. When I first run the application it will try to create the database matching my MVC models.

However, it doesn't have permission to create it I think. I get the following error:

CREATE DATABASE permission denied in database 'master'.

What user is trying to access the SqlServer and how can I add it's permissions to let it work?

This is the connectionstring I'm using (which should be right...)

<add name="ContextDb"
     connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;initial catalog=ContextDb"
     providerName="System.Data.SqlClient"/>

Cheers

© Server Fault or respective owner

Related posts about sql-server

Related posts about iis