When I checked the log (since I set stdoutLogEnabled="true"), I found an error that says:
fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
Failed executing DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='60']
CREATE DATABASE [SampleDb];
System.Data.SqlClient.SqlException (0x80131904): CREATE DATABASE permission denied in database 'master'.
I know it has something to do with the permission in the database.
The solutions below just worked for me:
- Connect to the database using SQL Server Management Studio.
- Click Security, then Logins
- Double click the user that will access your database. In my case it is NT AUTHORITY\NETWORK SERVICE
- Select the Server Roles and check the dbcreator, public, and sysadmin credentials.
No comments:
Post a Comment