无法从文件连接到数据库 [英] Can't connect to database from file

查看:389
本文介绍了无法从文件连接到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试连接通过:Microsoft SQL Server数据库文件(SqlClient中),但我收到错误:




在尝试连接到数据库失败,出现以下
信息:发生网络相关的或特定于实例的错误
建立SQL Server的连接。服务器是不是
找到或无法访问。验证实例名称是否正确
和SQL Server配置为允许远程连接。
(提供者:SQL网络接口,错误:52 - 无法找到
本地数据库运行时安装验证的SQL Server Express是正确安装
和本地数据库运行时功能是$ B。 $ b启用。)




所以,我点击连接到数据库服务器资源管理器





这窗口显示出来。我在其中选择:Microsoft SQL Server数据库文件(SqlClient中),然后浏览我的.MDF数据库文件。



$



$ b

单击确定之前给出提到的错误png格式ALT =在这里输入的形象描述>



服务器正在运行,我使用Windows身份验证数据库。
任何建议吗?


解决方案

您需要的SQL Server Express的LocalDB插件,你可以从它的这里在这两个86和放大器; AMD64版本。


I try to connect through: Microsoft SQL Server Database File (SqlClient), but I recieve error:

The attempt to attach to the database failed with the following information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)

So, i click Connect to Database in Server Explorer

This window show up. In which i choose: Microsoft SQL Server Database File (SqlClient) and then browse my .mdf database file.

Clicking ok gives error mentioned before:

Server is running, I use windows authentication in database. Any sugestions?

解决方案

You need the SQL Server Express LocalDB add-on, you can get it from here in both x86 & amd64 versions.

这篇关于无法从文件连接到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆