建立与 SQL Server 实例的远程连接
我无法与 SQL Server 2008 企业版建立远程连接。 我已经遵循并实施了很多可用的教程。这些是我所做的事情:
- 在 SQL 配置管理器中启用 TCP/IP 连接。
- 添加了一条规则以允许端口 1433 上的入站连接。
- 在相关实例的属性窗口中允许远程连接。
但它仍然给出错误 我正在尝试使用 AdventuresWorks 数据库安装用于复制的示例,但无法安装该示例。
这是我得到的错误
尝试创建“ReplData” 复制使用的共享 工作目录。
子目录或文件 C:\Program 文件\Microsoft SQL 服务器\100\样本\副本 化\ReplData 已经存在。名称 已分享。
输入 NET 可获得更多帮助 帮助MSG 2118。
HResult 0x274D,级别 16,状态 1 TCP 提供商:无法建立连接 因为目标机主动重新 融合了它。
Sqlcmd:错误:Microsoft SQL Server Native Client 10.0:网络相关 或者在立场特定的错误有 建立时发生 连接到 SQL Server。服务器是 未找到或无法访问。检查是否 实例名称正确且 SQL 服务器配置为允许远程 连接。欲了解更多信息,请参阅 SQL Server 在线书籍.. Sqlcmd: 错误:Microsoft SQL Server 本机 客户端 10.0:登录超时已过期。
出版物已创建 成功地。您必须创建一个 使用Web的虚拟目录 同步。如果您打算使用 单独的 Web 服务器,您必须运行 该 Web 上的 Web 同步向导 服务器。 (支持的证书 必须已安装 SSL。)
你想创建一个虚拟的 名为 SalesOrders for Web 的目录 在S2NWORKSTATION上同步? [y,n]
I am not able to establish remote connections to SQL Server 2008 enterprise edition.
I have followed and implemented a lot of tutorials available. These are the things i have done:
- enabled TCP/IP connections in SQL configuration manager.
- added a rule to allow inbound connections at port 1433.
- allowed remote connections in the properties window of the concerned instance.
But it still gives the error
I am trying to install samples for replication using AdventuresWorks database and i am not able to install the sample.
here is the error i got
Attempting to create the 'ReplData'
share that replication uses as the
working directory.A subdirectory or file C:\Program
Files\Microsoft SQL
Server\100\Samples\Replica
tion\ReplData already exists. The name
has already been shared.More help is available by typing NET
HELPMSG 2118.HResult 0x274D, Level 16, State 1 TCP
Provider: No connection could be made
because the target machine actively re
fused it.Sqlcmd: Error: Microsoft SQL Server
Native Client 10.0 : A network-related
or in stance-specific error has
occurred while establishing a
connection to SQL Server . Server is
not found or not accessible. Check if
instance name is correct and i f SQL
Server is configured to allow remote
connections. For more information see
SQL Server Books Online.. Sqlcmd:
Error: Microsoft SQL Server Native
Client 10.0 : Login timeout expired.The publication was created
successfully. You must create a
virtual directory to use Web
synchronization. If you plan to use a
separate Web server, you must run the
Web Synchronization Wizard on that Web
server. (A certificate that supports
SSL must already be installed.)Do you want to create a virtual
directory named SalesOrders for Web
synchronization on S2NWORKSTATION?
[y,n]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
启动 SQL 管理工作室
连接到服务器。
然后在对象资源管理器中选择服务器并右键单击属性。
然后检查“连接”设置,您可以/必须允许此数据库服务器的远程连接。
Start the SQL Management Studio
Connect to the server.
Then choose the server in the Object-Explorer and right-click on properties.
Then check the "connections" settings, there you can/have to allow remote connections for this database server.
您连接到默认实例还是命名实例?如果是命名实例,那么您应该运行 sql browser windows 服务。还要确保允许远程连接(我相信这与简单地打开 TCP/IP 是不同的设置)。
PorQryUI(端口查询)是一种有用的工具,它将测试是否打开了正确的端口。
Are you connecting to a default instance or named instance? If a named instance, then you you should have the sql browser windows service running. Also ensure that remote connections are allowed (I believe this is a different setting than simply turning on TCP/IP).
One tool that could be helpful is PorQryUI (Port Query), it will test to see if the proper ports are open.
我也遇到这个问题了。我通过做几件事解决了:
1. 确保我的本地计算机上启动了 SQL Browser 服务
2. 确保防火墙中的 UDP 端口 1434 已打开以供本地计算机上的传出
3. 确保防火墙中的 UDP 端口 1434 打开以供远程计算机传入。
UDP 端口用于 SQL Server 浏览器。显然,Visual Studio 使用它来检测远程服务器是否存在。
这个 Stack Exchange 线程对我非常有帮助。
I too, had this problem. I solved by doing a couple of things:
1. Make sure the SQL Browser service is started on my local machine
2. Make sure UDP Port 1434 in the firewall is open for outgoing on the local machine
3. Make sure UDP Port 1434 is open in the firewall for incoming on the remote machine.
The UDP Ports are for the SQL Server Browser. Apparently, Visual Studio uses that to detect that the remote server exists.
This Stack Exchange thread was very helpful to me.