如何在客户端计算机上安装我的设置和数据库? [英] How do I install my setup and database on client computer?

查看:65
本文介绍了如何在客户端计算机上安装我的设置和数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS 2013和带有MS Sql server 2014的数据库开发了一个软件。我为localdb创建了一个用户'admin',使用installshield将其附加到安装程序但我仍然收到异常用户admin登录失败在另一台计算机上启动后。剩下要做什么了?我将不胜感激任何帮助。



我的尝试:


我在其他计算机系统上安装了sql localdb。

我尝试在我的计算机上启动项目,即使在我分离数据库之后也能正常运行来自sql server management studio。

解决方案

MS Sql Server - 顾名思义 - 基于服务器的系统。这意味着你不要在客户端PC上安装它。

有几个原因:

0)出于版权原因,您只能分发SQL Server Express,而不是SQL Server完整版。

1)他们可能已经在网络上安装了SQL Server。如果是,那么他们可能会想要使用该版本。

2)如果他们确实安装了SQL服务器并且您开始扩散SQL Server Express实例,那么您将会惹恼数据库管理员...... br />
3)SQl Server的单站点安装比用户控制下的许多分散版本更有可能被备份。

4)Sql server非常复杂对于普通用户来说,安装和管理 - 这不是一个好主意!

5)它将破坏使用Sql Server而不是SqlCE或SQLite的主要优势 - 多用户访问。如果每个人都安装了自己的SQL服务器副本,那么您将拥有数据库的多个副本,每个副本由一个人使用。这会引起一些混乱,并且(取决于你如何编写原始数据库)在实现问题时可能需要付出相当大的努力才能组合成单个实例。



如果您需要多用户访问 - 这是SQL Server和MySql擅长的 - 您要做的是将数据库添加到服务器的现有实例,或让用户设置适当的服务器安装,并提供相应的登录详细信息并添加你的数据库。每次尝试使用localdb服务器就像使用一个非常复杂的大锤来破解开心果,并抛弃使用基于服务器的系统 - 同时多用户访问。



如果您不需要多个用户访问同一个数据库,那么请更改您的代码以使用SqLite,Sql Server Compact,甚至是Access - 它们不需要单独的安装应用程序,而且仅用于单用户访问

I developed a software with VS 2013 and the Database with MS Sql server 2014. I created a user 'admin' for the localdb, attached it to the setup using installshield but I still get an exception "Login failed for user admin' after launching on another computer. What is left to be done? I will appreciate any help.

What I have tried:

I have installed sql localdb on the other computer system.
I tried launching the project on my computer and it works fine even after I detached the db from sql server management studio.

解决方案

MS Sql Server is - as the name implies - a server based system. Which means you don't install it on client PCs.
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 you need multiuser access - which is what SQL Server and MySql are good at - what you do is add your DB to an existing instance of the server, or get the user to set up an appropriate server installation complete with appropriate login details and add your DB to that. Trying to use a localdb server each time is like using a very complicated sledgehammer to crack a pistachio, and throws away the very point of using a server based system - simultaneous multiuser access.

If you don't need multiple users accessing the same DB, then change your code to use SqLite, Sql Server Compact, or even Access - which do not need a separate installation app, and which are designed for single user access only.


这篇关于如何在客户端计算机上安装我的设置和数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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