SQL Server:无需 SSMS 即可启用远程连接
我的 Web 服务器上安装了 SQL Server Express 2008,默认情况下它不允许远程连接(可能是件好事)。由于磁盘空间和其他原因,我选择不随它一起安装 SQL Server Management Studio Express。
我需要启用远程连接,但我能找到的任何说明都涉及使用 SSMS 来更改该设置。当然,我可以从 sqlcmd.exe 中使用某种 transact-sql 语句来更改设置?!
谢谢!
I've got a SQL Server Express 2008 install on my web server, which by default does not allow remote connections (probably a good thing.) I opted not to install SQL Server Management Studio Express along with it for disk space and other reasons.
I need to enable remote connections but any instructions I can find involve using SSMS to change that setting. Surely there's a transact-sql statement of some kind i can from from sqlcmd.exe to change the setting?!
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我进入我的 SMS 和本地实例属性 ->连接->选中“允许远程连接到此服务器”并编写更改脚本。
I went into my SMS and my local instance properties -> Connections -> checked "Allow remote connections to this server" and scripted the change.
即使没有安装 Management Studio,开始菜单中也应该有一个 SQL 配置工具(开始 > 程序 > SQL Server 2008 > 配置工具 > SQL Server 配置管理器)。您可以使用此工具启用远程连接:
另请注意,对此配置的更改将需要重新启动 SQL Server 服务,并且当您设置要侦听的端口(默认为 1433)时,您将需要在可能运行的任何防火墙中创建规则以允许通信。祝你好运!
Even without installing Management Studio, there should be a SQL Configuration tool in your start menu (Start > Programs > SQL Server 2008 > Configuration Tools > SQL Server Configuration Manager). You can use this tool to enable remote connections:
Also note that changes to this configuration will require a restart of the SQL Server service, and when you set the port to listen on (the default is 1433), you will need to create rules in any firewall you may have running to allow the communication. Good luck!
@crizCraig 的回答帮助我让它发挥作用。
我将简要描述我为成功执行 cmd 所做的事情。
配置:
远程计算机上的 2 个 SQL // SQL2005 + 2008 Express 实例,拒绝安装 Management Studio 2008。
C:\Program Files\Microsoft SQL Server\100\Tools\Binn
以下是我从中获取信息的链接:
http://msdn.microsoft.com/en-us/library/ms162773。 ASPX
http://msdn.microsoft.com/en-us/library/ms162816。 ASPX
@crizCraig's answer helped me getting it to work.
I'll describe in short what I did, to successfully execute the cmd.
config:
2 instances of SQL // SQL2005 + 2008 Express instance on the remote machine, which refuses to install Management Studio 2008.
C:\Program Files\Microsoft SQL Server\100\Tools\Binn
Here are the links I got the info from:
http://msdn.microsoft.com/en-us/library/ms162773.aspx
http://msdn.microsoft.com/en-us/library/ms162816.aspx
在 SQL Express 2014 上,所有答案都不起作用。这对我有用:
On SQL Express 2014 none of the answers worked. This is what worked for me: