如何在本地网络的服务器上将db附加到sql express [英] How to attach db to sql express on server in a local network

查看:75
本文介绍了如何在本地网络的服务器上将db附加到sql express的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个winform应用程序,可以使用sql express创建的数据库。

这个应用程序应该可以工作本地网络。它是客户端,应该在本地网络中的每个客户端上安装和运行。但是,sql表示服务器在网络服务器上但不在客户端上。



我也为我的应用程序创建了一个设置,并将它的数据库添加到安装项目中。



现在的问题是如何将数据库附加到在客户端上安装安装项目后,在服务器上使用sql express?

Hi all,

I have a winform application which works with a database created by sql express.
This application should work on a local network.It is client base and should install and run on each client in the local network.However the sql express server in on the server of network but not on clients.

Also i have created a setup for my application and add it's database to the setup project.

Now the problem is that how can i attach the database to the sql express on server after installing the setup project on the clients?

推荐答案

您无法从另一台计算机上附加新数据库。

当你在SQL Express上附加数据库,所有数据库文件(.mdf,.ldf)必须位于运行SQL Express的计算机中。

恢复数据库也是如此。



也许在SQL Expres上手动附加数据库更容易s?
You cannot attach a new database from another computer.
When you attach a database on the SQL Express, all database files (.mdf, .ldf) has to be in the computer where SQL Express is running.
The same goes for restoring a database.

Perhaps it is easier to attach the database manually on SQL Express?






附加DB SQL Server:http://msdn.microsoft.com/en-IN/library/ms190209.aspx [ ^ ]



恢复数据库SQL Server: http://msdn.microsoft.com/en-IN/library/ms177429.aspx [ ^ ]



连接字符串&配置: http://msdn.microsoft.com/en-us/library /ms254494(v=vs.110).aspx [ ^ ]



您还需要其他东西吗?



谢谢,

Suvabrata
Hi,

Attach DB SQL Server : http://msdn.microsoft.com/en-IN/library/ms190209.aspx[^]

Restore Database SQL Server : http://msdn.microsoft.com/en-IN/library/ms177429.aspx[^]

Connection string & Config : http://msdn.microsoft.com/en-us/library/ms254494(v=vs.110).aspx[^]

Do you required any thing else?

Thanks,
Suvabrata


这篇关于如何在本地网络的服务器上将db附加到sql express的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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