Windows 7 中的 SQL Server Management Studio 本地数据库连接错误 [英] SQL server management studio local database connection error in windows 7

查看:33
本文介绍了Windows 7 中的 SQL Server Management Studio 本地数据库连接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 7 中运行 SQL Server 2012 Management Studio Express,我在连接到本地数据库时遇到问题.我尝试了上述所有解决方案,没有奏效.请帮忙.提前致谢.

安装网址是 之类的工具以 NT AUTHORITY\SYSTEM 身份运行 SSMS:

PsExec -s -i "C:\...ssms 的路径...\Ssms.exe"

无论是作为 sa 连接还是需要使用 PSExec 连接,接下来的步骤是:

  1. 确保您的 Windows 帐户是服务器 > 安全 > 登录下的登录名.如果它不存在,请通过右键单击登录">新登录"来添加它.
  2. 确保登录是 sysadmin 固定服务器角色的成员.如果不是,请确保它位于服务器角色"选项卡下.

I'm running SQL Server 2012 Management Studio Express in windows 7, i am having issues connecting to the local db. i tried all the above mentioned solutions, didnt work. please help. thanks in advance.

Installation url is here.

error- 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: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

For help, click MSDN link.

解决方案

Assuming you installed SQL Server and used the named instance SQLEXPRESS, your server name should be:

.\SQLEXPRESS

Or:

127.0.0.1\SQLEXPRESS

You can check the instance name (it may not be SQLEXPRESS) and that the server is running in the Start Menu at a path very similar to this (but it will vary by version):

Start > Programs > Microsoft SQL Server > Configuration Tools >
   SQL Server Configuration Manager

If it is currently stopped, you need to right-click and choose Start:

You should also right-click and ensure that Startup Mode is set to automatic (this is under Properties > Service).

The error message seems to imply that the server is trying to use named pipes. While locally it should be able to use shared memory, you should next ensure that the SQL Server Browser service is running. You can do that in:

Control Panel > Administrative Tools > Services

If it's not started, start it, and set its Start Mode to automatic. (As above, you can do both of these things from the right-click menu.)

If you're still not getting anywhere, it's possible you installed SQL Server 2012 without manually adding your Windows account to the group of administrators. If this is the case, hopefully you set it to use mixed mode and you can connect as sa. Otherwise you will need to use a tool like PSExec.exe to run SSMS as NT AUTHORITY\SYSTEM:

PsExec -s -i "C:\...path to ssms...\Ssms.exe"

Whether you can connect as sa or you need to connect using PSExec, the next steps are:

  1. make sure your Windows account is a login under Server > Security > Logins. If it's not there, add it by right-clicking Logins > New Login.
  2. make sure that login is a member of the sysadmin fixed server role. If it's not, make sure it is under the Server Roles tab.

这篇关于Windows 7 中的 SQL Server Management Studio 本地数据库连接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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