简体   繁体   English

无法使用Management Studio连接到SQL Server 2008 R2

[英]Cannot connect to SQL Server 2008 R2 with Management studio

Today I get this strange exception: 今天,我得到了一个奇怪的异常:

Error HRESULT E_FAIL has been returned from a call to a COM component. 错误HRESULT E_FAIL已从对COM组件的调用返回。 (mscorlib) (mscorlib程序)

I cannot connect to my database! 我无法连接到我的数据库! Tool started under admin rights. 该工具已在管理员权限下启动。

在此处输入图片说明

在此处输入图片说明

Services: 服务:

在此处输入图片说明

I am not sure if disabling firewall is enough. 我不确定禁用防火墙是否足够。 if the user has sysadmin permissions and still getting this error means client is not able to connect to server in debugging mode. 如果用户具有sysadmin权限并且仍然出现此错误,则表示客户端无法以调试模式连接到服务器。 check this TCP and UDP ports are correctly open. 检查此TCP和UDP端口是否正确打开。

SQL remote debugging configuration SQL远程调试配置

EDIT:1 编辑:1

I am sure you must have also googled a lot and tried to find out about the error messages. 我敢肯定,您一定也在Google上搜索了很多,并试图找出有关错误消息的信息。 What I have found so far is the Error in the OP you mentioned is misleading and from that error, we cannot tell what exactly is wrong or what to look next. 到目前为止,我发现的是您提到的OP中的错误具有误导性,从该错误中我们无法确定确切的错误或下一步的操作。 But as you replied in the comments, after making changes to enable Remote Debugger; 但是正如您在注释中回答的那样,进行了更改以启用远程调试器之后; the mentioned error is more clear and I feel that proper permission is still an issue. 提到的错误更加清楚,我认为适当的许可仍然是一个问题。 Plenty of other suggestion you also might have tried so far, but if you haven't done this, let's try one more time: 到目前为止,您可能还尝试了很多其他建议,但是如果您还没有这样做,让我们再尝试一次:

In one of the comments, I mentioned you to try login using the windows user. 在其中一项评论中,我提到您尝试使用Windows用户登录。

Now Keep the settings you already did for TCP ports, Firewall Exception etc… explained in the above link. 现在,保留上面链接中已说明的TCP端口,防火墙例外等设置。 you have windows 2012 server where you installed DB server. 您有Windows 2012服务器安装DB服务器的位置。 and windows 8 Prof where you have DB client and you connecting through SSMS. 和Windows 8 Prof,您有DB客户端,并通过SSMS连接。 Now I believe both machines are in the same domain. 现在,我相信两台机器都在同一个域中。 Let's say domain XYZ. 假设网域XYZ。 You must have windows login on the server, let's say it is “XYZ\\HALI” using which you can login to the Windows Server. 您必须在服务器上具有Windows登录名,例如,它是“ XYZ \\ HALI”,可用于登录Windows Server。 log in and make sure that login also exists in SQL SERVER with sysadmin permission. 登录并确保具有sysadmin权限的SQL SERVER中也存在登录名。 Because client machine is also in same domain make sure you have logged in into the client machine using same user “XYZ\\HALI”. 由于客户端计算机也位于同一域中,因此请确保您使用相同的用户“ XYZ \\ HALI”登录到客户端计算机。 Now start SSMS and choose windows authentication instead of SQL SERVER authentication. 现在启动SSMS并选择Windows身份验证而不是SQL SERVER身份验证。 Try to start Debugging T-SQL code now. 尝试立即开始调试T-SQL代码。

if client and server machines are not in same domain then we have to register server name on client machine as Linked Server, impersonate the login/user as local and then try the debugging. 如果客户端计算机和服务器计算机不在同一域中,则我们必须在客户端计算机上将服务器名称注册为“链接服务器”,将登录名/用户模拟为本地,然后尝试调试。

Edit:2 编辑:2

Login to SSMS using Windows Authentication 使用Windows身份验证登录到SSMS

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用Management Studio连接到SQL Server 2008 R2实例 - Unable to connect to SQL Server 2008 R2 instance with management studio 无法从服务器资源管理器,SQL Server 2008 R2 Management Studio等连接到远程数据库 - Unable to connect to remote databases from server explorer, sql server 2008 r2 management studio and others SQL Server 2008 R2-在打开SQL Server Management Studio之前,无法连接实例中的某些数据库 - SQL Server 2008 R2 - Some database in an instance cannot be connected until SQL Server Management Studio is opened 无法登录SQL Server 2008 R2 Management Studio中的服务器 - Unable to log in to server in SQL Server 2008 R2 Management Studio SQL Server 2008 R2无法连接到Management Studio中的本地数据库 - SQL Server 2008 R2 can't connect to local database in Management Studio 使用SQL Server Management Studio 2008 r2和adodbapi设置并连接到本地SQLEXPRESS数据库 - Set up and connect to local SQLEXPRESS database using SQL Server Management Studio 2008 r2 and adodbapi 无法使用Liferay 6.2连接MS SQL Server Management Studio 2008 R2 - Unable to connect with MS SQL Server management studio 2008 r2 with Liferay 6.2 SQL Server Management Studio Express 2005至2008 R2 - SQL Server Management Studio Express 2005 to 2008 R2 找不到SQL Server R2 2008开发人员版的Management Studio - Management Studio not found for SQL Server R2 2008 Developer Edition SQL Server Management Studio 2008 R2 中的查询分析器在哪里? - Where is the Query Analyzer in SQL Server Management Studio 2008 R2?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM