實體框架7代碼第一個錯誤CREATE DATABASE權限被拒絕在數據庫'master'中 - Entity Framework 7 code first error CREATE DATABASE permission denied

實體框架7代碼第一個錯誤CREATE DATABASE權限被拒絕在數據庫'master'中 - Entity Framework 7 code first error CREATE DATABASE permission denied ,第1张

I'm using vs2015 an vNext/Asp.net5 wint EF7. my config.json file has following value

我正在使用vs2015 vNext / Asp.net5 wint EF7。我的config.json文件具有以下值

"TestContextConnection": "Server=.\SQLEXPRESS;Database=TestDb;Trusted_Connection=true;MultipleActiveResultSets=true"

Whenever I run this project I get the following error

每當我運行這個項目時,我都會收到以下錯誤

CREATE DATABASE permission denied in database 'master'.

Can someone please explain, I don't know what user I'm referring here is it my active directory user or some other dbuser? also what rights I've to assign to what user in order this code to work successfully? what if I have to create a new user from scratch with all required permissions for this?

有人可以解釋一下,我不知道我在這里指的用戶是我的活動目錄用戶還是其他一些dbuser?還有什么權利我分配給哪些用戶才能使這段代碼成功運作?如果我必須從頭創建一個具有所有必需權限的新用戶怎么辦?

Thanks in advance.

提前致謝。

2 个解决方案

#1


1  

Do you need to use the TestDb database on the SQLEXPRESS server, or are you just trying to get something up and running?

您是否需要在SQLEXPRESS服務器上使用TestDb數據庫,或者您只是想嘗試啟動並運行?

If you are just trying to get something up and running, try using the following for your connection string: Server=(localdb)\MSSQLLocalDB;Database=<DATABASE_NAME>;Trusted_Connection=True;MultipleActiveResultSets=true

如果您只是嘗試啟動並運行,請嘗試使用以下連接字符串:Server =(localdb)\\ MSSQLLocalDB; Database = ; Trusted_Connection = True; MultipleActiveResultSets = true

最佳答案:

本文经用户投稿或网站收集转载,如有侵权请联系本站。

发表评论

0条回复