且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法连接到我自己的 MDF 文件.无法打开用户默认数据库.登录失败.用户登录失败...和其他错误

更新时间:2023-02-03 10:27:20

试试这个:

1- 创建一个与 mdf 文件同名的数据库.

1- Create a database with the same name to mdf file.

2- 停止 sql 服务

2- Stop sql service

3- 转到所有 mdf 文件和 ldf 所在的数据地毯,复制原始 mdf 文件并替换.

3- Go to the Data Carpet where is all mdf files and ldf , copy your original mdf file y replace.

4- 启动服务

5- 在管理工作室查看数据库是否仍然在线.

5- See in the management studio if the database still online there you go.