在局域网上共享SQL Express数据库 [英] Sharing SQL Express Database on lan

查看:109
本文介绍了在局域网上共享SQL Express数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,专家,
我正在Visual Studio 2005 C#中作为前端开发Windows基本应用程序,并在SQL Express Edition [VS.NET附带]中开发后端应用程序.我有一个包含三个PCS的局域网,一个作为服务器,另外两个作为客户端.我想将数据库保留在服务器上并与客户端共享.我有8个端口交换机来设计LAN.共享数据库需要做什么,连接字符串应该是什么,应该将数据库保留在服务器的哪个文件夹中.
我需要一个有效的解决方案.
在此先谢谢您.

Hi experts,
I am developing a Windows base application in Visual Studio 2005 C# as front end and SQL Express Edition [that comes with VS .NET] as backend. I have a lan containing three PCS, one as Server and another two as Clients. I want to keep the database on the server and share it with the client. I have 8 port switches to design the LAN. What do I have to do to share the database and what should be the Connection string and in which folder should I keep the database on server.
I need an efficient solution.
Thanks in advance.

推荐答案

请看以下文档.它说明了操作方法

启用对SQL Server Express的网络访问 [
Take a look at the following documentation. It explains how to do it

Enabling Network Access to SQL Server Express[^]


高级概述-

1.获取sql 2005 express-< a href ="http://goo.gl/59WLi"> http://goo.gl/59WLi</a> [< a href ="http://goo .gl/59WLi"target =" _ blank"title ="新窗口> ^</a>]

2.获取sql 2005 Express Management Studio-
http://goo.gl/YhbX2 [
4.从开发机上备份数据库,并将其还原到新的sql服务器上(使用远程或本地sql服务器管理工​​作室).

5.默认实例的计算机名称后没有后缀...因此您的连接字符串应仅指定您的服务器.我猜您没有集中式身份验证,并且您在连接字符串中使用sql auth.

这有帮助吗?
a high-level overview -

1. get sql 2005 express - <a href="http://goo.gl/59WLi">http://goo.gl/59WLi</a>[<a href="http://goo.gl/59WLi" target="_blank" title="New Window">^</a>]

2. get sql 2005 express management studio - http://goo.gl/YhbX2[^] (probably just get the 32-bit one - no x64 in the download name)

3.install sql 2005 express - use a default instance with mixed auth - windows and sql. set a strong "sa" password.

4. backup your db from your dev machine and restore it onto your new sql server (using remote or local sql server management studio).

5. the default instance will not have a suffix after the computer name...so your connection string should just specify your server. i''m guessing you have no centralized authentication and that you are using sql auth in your connection string.

does this help?


感谢您的亲切答复
我已经完成了您回答中的所有步骤.
但是我仍然遇到错误.如果我使用servername/,则会出现错误[无法登录用户sa]
如果使用<code><code>servername/SQLExpress
它给出错误[无效的连接字符串]
thank you for your kind reply
I have completed all the steps in your answer.
but i still getting error. if i use servername/ it gives error [Failed to login user sa]
if if use <code><code>servername/SQLExpress
it gives eror [Invalid connection string]


这篇关于在局域网上共享SQL Express数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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