部署 SQL Server:安装第二个实例?
简单的问题。我正在开发一个 Delphi 2007/WIN32 应用程序,它现在使用 MS Access 作为简单的数据存储。我必须修改它以支持 SQL Server Express,这很容易。这些修改正在发挥作用,因此可以使用 SQL Server 或 MS Access 部署应用程序。 (无论用户喜欢什么。)我确实考虑过将整个应用程序与 SQL Compact 一起部署,但这并不实用。使用 SQL Server Express 2008 而不是 2005 是一种选择,但也有一些令人讨厌的副作用,我们暂时不想解决。
问题是部署整个项目。 SQL Server 的安装需要安静安装,以便用户不会注意到。文档中提到了 SQL Server,因此他们知道它的存在。我们只是不想用技术问题来打扰他们。在大多数情况下,这样的安装会顺利进行。
但是,如果用户已经安装了用于其他用途的 SQL Server (2005),该怎么办?就我个人而言,我更愿意在他们的系统上安装第二个 SQL Server 实例,这样就不会与其他安装发生冲突。 (因此,如果他们卸载其他应用程序,SQL 实例将保持安装状态。)
虽然只需使用实例的两个不同名称即可将 SQL Server 2005 和 2008 安装在同一系统上,但我想知道是否也可以安装SQL Server 2005 在单个系统上运行两次以获得两个实例。如果可能的话,如何实现?
Simple problem. I'm working on a Delphi 2007/WIN32 application which now uses MS Access as simple data store. I have to modify it to support SQL Server Express, which is easy. These modifications are working so the application can be deployed using either SQL Server or MS Access. (Whatever the user prefers.) I did consider deploying the whole application together with the SQL Compact but this is not practicak. Using SQL Server Express 2008 instead of 2005 is an option, but also has a few nasty side-effects which we don't want to resolve for now.
The problem is deploying the whole project. The installation with SQL Server would need a quiet installation so the user won't notice it. SQL Server is mentioned in the documentation so they know it's there. We just don't want to bother them with technical issues. In most cases, such an installation will go just fine.
But what if the user already has an SQL Server (2005) installation which is used for something else? Personally, I would prefer to just install a second instance of SQL Server on their system so it won't conflict with the other installation. (Thus, if they uninstall the other app, the SQL instance will just stay installed.)
While SQL Server 2005 and 2008 can be installed on the same system simply by using two different names for the instance, I wonder if it's also possible to install SQL Server 2005 twice on a single system to get two instances. And if possible, how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
回答你的问题:是的,SQL2005/SQL2008 和 SQLExpress2005/2008 可以幸福地并存。 SQLExpress 安装的默认实例名称是 [计算机名称]\SQLEXPRESS。但话虽如此,您应该考虑让您的客户选择使用他们已有的 sql 实例,并且仅在他们选择的情况下安装新实例。
我不知道 SQLExpress 是否可以静默安装(很可能可以,只要您在安装时在命令行上指定正确的属性)。但我们已经向很多客户推出了它,他们正常安装时几乎没有遇到任何问题。
编辑:我已将其添加为编辑,因为评论不允许足够。
我理解您不愿意让用户手动安装 SQL 并共享另一个实例。为了解决这些问题:
我希望这会有所帮助 - 我只是试图说服您,需要单独实例的原因有限,并且 99% 的情况下您可以很好地安装到现有实例中。拥有自己的实例固然很好,但实际上它并没有给您带来什么真正的好处,特别是当您使用强大的安装程序时。
To answer your question: yes SQL2005/SQL2008 and SQLExpress2005/2008 can all live happily side by side. The default instance name for the SQLExpress install is [machine name]\SQLEXPRESS. But having said that, you should consider giving your customer the option to use the sql instance they already have, and only install a new instance if they choose to.
I don't know if SQLExpress can be installed silently (most likely it can as long as you specify the right properties on the command line when you install it). But we have rolled it out to lots of customers, and they have very few issues installing it normally.
Edit: I have added this as an edit because a comment doesn't allow enough.
I understand your reluctance to both having the user install SQL manually, and to sharing another instance. To address these points:
I hope this helps somewhat - i'm just trying to persuade you that there are limited reasons for needing a separate instance and that 99% of the time you will be fine installing in to an existing instance. It's nice to have your own instance but in reality it brings you few real benefits, especially if you are using a robust installer.
您可以使用 /Q 命令行开关以静默模式安装 SQL Server Express,或使用 /QS 命令行开关来查看安装进度,而无需用户输入。您可以在已安装 SQL Server 的系统上安装命名实例。
http://msdn.microsoft.com/en-us/library/ms144259。 ASPX
You can install SQL Server Express in silent mode using the /Q command line switch or use the /QS command line switch to see setup progress without user input. You can install a named instance on a system that already has SQL Server installed.
http://msdn.microsoft.com/en-us/library/ms144259.aspx
拥有自己的 SQL Server 实例非常有用,原因有很多。
隔离您的安装(文件、注册表项、DLL 和其他产品)是一个非常好的做法!
此外,卸载 SQL Server 实例不会导致数据丢失,因为数据库的数据文件不会被删除。重新安装后,如果需要,您可以再次附加数据文件。
话虽这么说,SQL Server Express 可以以三种不同的交互模式安装:
可以找到详细的安装说明在 http://msdn.microsoft.com/en-我们/库/ms144259(SQL.90).aspx
There are a number of reasons why it is very useful to have your own instance of an SQL Server.
Isolation of your installments (files, registry keys, dll's and other products) is a very good practice!
Also, uninstalling an SQL Server instance doesn't lead to data loss, because the data files of the databases will not be removed. After reinstalling, you can attach the data files again if needed.
that being said, SQL Server express can be installed in three different interaction modes:
Detailed instructions for installation can be found at http://msdn.microsoft.com/en-us/library/ms144259(SQL.90).aspx