Update-Database fails creating a database with mssqllocaldb
See original GitHub issueDear Maintainer,
Update-Database fails creating a database with mssqllocaldb when using the default App.config I receive the following error: CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file ‘C:\Users\[Username][Projectname].[Contextclass].mdf’.
It looks like it is missing a '\'
between the username and the projectname.
Is this database location assigned by SQL Server LocalDb or is this a problem in ‘System.Data.Entity.Infrastructure.LocalDbConnectionFactory’?
Thank you in advance.
Best regards,
NiekGr
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:24 (7 by maintainers)
Top Results From Across the Web
Update-Database - Error with (localdb)\MSSQLLocalDB
This error message informs you that it is not possible to connect to MSSQL Server and app will not connect to the database....
Read more >Update-Database failing to create database - missing a ...
At the Update-Database point, I am receving this error message: CREATE FILE encountered operating system error 5(Access is denied.) ...
Read more >LocalDB v14 creates wrong path for mdf files
UPDATE. As of CU 6 for SQL Server 2017, this bug has been fixed. It is now possible to execute the following successfully:...
Read more >MSSQLSERVER_18456 - SQL Server
A connection attempt is rejected due to a failure with a bad password or username in SQL Server. See an explanation of the...
Read more >Update-Database not creating tables in SQL Server when ...
I'm creating a Student Management MVC application that will manipulate information from a database. I added the DBContext builder.Services.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Installing and applying the latest SQL Server 2017 CU is probably the simplest cure.
Seems related to conflicting version of SQLLocalDB. Visual Studio comes with version 2016. The problem occurs when you have installed version 2017. To resolve the problem follow these steps:
EntityFrameWork migraton will now succeed (slash is added to the path)