现在更改了数据库默认位置我无法创建数据库

Changed Database Default Locations now I can't create database

我使用 Microsoft SQL Server Management Studio 更改了数据库默认位置,现在,当我启动我的应用程序时,它应该使用 Visual Studio 创建一个数据库,所以我拥有管理员权限,它是这样说的:

Directory lookup for the file "D:\MSSQL\DATA\DatabaseNameE.mdf" failed with the operating system error 3(The system cannot find the path specified.).
CREATE DATABASE failed. Some file names listed could not be created. Check related errors. 

我 100% 确定路径正确且文件夹存在。

我通过查看数据库默认位置的默认文件夹的安全属性解决了这个问题。它以 mssql$sqlexpress 作为具有完全控制权的用户。所以我将它添加到数据库默认位置的新文件夹的安全属性中。