使用 TCP/IP 访问 SQL Server 2008 Express 数据库
VS 2010 附带 SQL 2008 Express,并将现有项目的数据库也升级到 SQL 2008(如果我错了,请纠正我!) - 但是,我现在有一个问题 - 我需要在我的 PC 上模拟托管情况,其中桌面应用程序使用 TCP/IP 连接到 SQL 2008 数据库。
问题
1. 在 VS 2010 中创建的数据库是一个用户实例,我似乎无法通过 TCP/IP 访问它 - 我想我需要将其设为服务器实例才能这样做?
2. 我有 SQL Management Studio Express 2005,它不允许我连接到 SQL 2008 来附加用户实例,并且在尝试安装 Studio Express 2008 时我已经抓狂,但仍然失败
任何人都可以告诉我我是否走在正确的轨道上或者是否有更简单的方法来做到这一点?
VS 2010 comes with SQL 2008 Express, and upgrades existing project's databases to SQL 2008 as well (please correct me if im wrong!) - however, I now have a problem - I need to simulate a hosting situation on my PC, where a desktop application connects using TCP/IP to the SQL 2008 database.
Problems
1. The database as created in VS 2010 is a user instance which I cant seem to access via TCP/IP - I assume I need to make this a server instance to do so?
2. I have SQL Management Studio Express 2005 which wont allow me to connect to SQL 2008 to attach the user instance and have torn my hair out trying to install Studio Express 2008, but still failed
Can anyone tell me if Im either on the right track or if there's a simpler way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在 SQL Express 上显式启用 TCP/IP。
http://www.linglom .com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/
https://web.archive.org/web/20151204091559/http://blogs.msdn.com:80/b/sqlexpress/archive/2005/05/05/415084.aspx
You need to explicitly enable TCP/IP on SQL Express.
http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/
https://web.archive.org/web/20151204091559/http://blogs.msdn.com:80/b/sqlexpress/archive/2005/05/05/415084.aspx