在不使用SQL Server Managment Studio的情况下将SQL Server数据库移动到其他PC的SQL Server. [英] Moving SQL-Server Database to other PC's SQL Server without using SQL Server Managment Studio.?

查看:63
本文介绍了在不使用SQL Server Managment Studio的情况下将SQL Server数据库移动到其他PC的SQL Server.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是开发人员,

我已经在我的PC上使用SQL-Server作为后端数据库创建了一个WinForm应用程序.

现在,我已经在客户端PC上安装了我的应用程序,我需要复制我拥有的数据库

在我的PC上创建的文件应复制到客户端PC.

我不需要在客户端计算机上安装整个Sql Server Management Studio.

很好,我只是在客户端PC上安装SQL-Server并在客户端上添加数据库

PC的SQLServer而不安装SQLServer Management Studio.

有可能吗?那请救救我....

谢谢.....

I am a developer,

I have created one WinForm Application on my PC with SQL-Server as BackEnd Database.

Now I have installed my application on Client PC and I required to copy Database I have

created on my PC should be copy to client PC.

I don’t required to install entire Sql Server Management studio on Client Machine.

It is good I just installing SQL-Server on Client PC and Adding my Database on Clients

PC’s SQLServer without installing SQLServer Management Studio.

Does it possible? then please help me….

Thanks…..

推荐答案

您可以编写一个脚本来还原备份,并使用C#代码运行它.
You can write a script that restores a backup, and run it using C# code.


备份-还原组合是一种可能: http://msdn.microsoft.com/en-us/library/ms186865 .aspx [ ^ ]

另一个选择是使用分离-附加操作: http://msdn.microsoft.com/en-us/library/ms190794.aspx [ ^ ]
Backup - restore combination is one possibility: http://msdn.microsoft.com/en-us/library/ms186865.aspx[^]

Another option is to use detach - attach operations: http://msdn.microsoft.com/en-us/library/ms190794.aspx[^]


否.而且您也不应该这样做.
您不应在安装中包括SQL Server.有两个原因:
0)您只能出于版权原因分发SQL Server Express-不能分发SQL Server完整版.
1)他们可能已经在网络上安装了SQL Server.如果是这样,那么他们大概会想使用该版本.
2)如果他们确实安装了SQL Server,并且您开始激增SQL Server Express实例,那么您将烦恼数据库管理员...
3)与在用户控制下的多个分散版本相比,备份SQl Server的单个站点的可能性要大得多.
4)对于普通"用户来说,安装和管理Sql Server非常复杂-这不是一个好主意!
5)它将破坏使用SqlServer而不是SqlCE或SQLite的主要优势-多用户访问.如果每个人都安装了自己的SQL Server副本,那么您将拥有数据库的多个副本,每个副本都由一个人使用.这将引起一些混乱,并且(取决于您编写原始数据库的方式)在实现问题时可能需要花费相当大的精力才能组合成一个实例.

如果要通过不安装SQL Management Studio来阻止他们使用数据库,那么使用不需要任何管理的单个用户数据库会好得多.
No. And you shouldn''t do it anyway.
You should not include SQL Server in your installation. There are a couple of reasons:
0) You can only distribute SQL Server Express for copyright reasons - not SQL Server full version.
1) They may already have SQL Server installed on the network. If so, then they will presumably want to use that version.
2) If they do have SQL server installed and you start proliferating SQL server Express instances, you are going to annoy the heck out of the database administrator...
3) A single site installation of SQl Server is a lot more likely to be backed up than a number of scattered version under user control.
4) Sql server is quite complex for a "normal" user to install and administer - it is not a good idea!
5) It will destroy the primary advantage of using Sql Server over SqlCE or SQLite - multiuser access. If everyone installs their own copy of SQL server, then you will have multiple copies of your database, each used by a single person. This will cause some confusion, and (depending on how you wrote the original database) may take some considerable effort to combine into a single instance when the problem is realized.

If are trying to prevent them from playing with the database by not installing SQL management Studio, then you would be much, much better off using a single user database that does not require any management.


这篇关于在不使用SQL Server Managment Studio的情况下将SQL Server数据库移动到其他PC的SQL Server.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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