正确的部署工具来复制文件&运行SQL脚本 [英] Correct deployment tool to copy files & run SQL Script
本文介绍了正确的部署工具来复制文件&运行SQL脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
升级:
- 必须从客户机而不是服务器运行。
- 必须显示一个对话框以选择网络位置并将文件复制到共享
- 必须显示一个对话框才能输入SQL Server连接信息,升级必须连接到SQL Server才能运行升级脚本。
- 不能更改运行升级的客户端机器上的任何内容。 (没有添加/删除程序,注册表等等),否则Windows Installer。)
- 不得依赖任何其他dll或框架。用户必须能够下载单个文件并从Windows XP SP2运行,而无需安装任何其他文件。
有些事情我仔细研究:
- 批处理文件(不能显示允许用户输入连接信息的对话框)
- OSQL(无法显示对话框,无法复制文件)
- WiX(运行在Windows Installer之上,以便将其放在客户端计算机上运行)
- 自定义C#/ VB应用程序(需要.NET框架)
- Winzip / WinRAR(不能显示对话框,不能运行SQL脚本)
解决方案
如果您不想依赖任何dll和框架你应该做一个原生的应用程序,这可以是例如定制的winrar sfx(可以在提取之后运行其他脚本,这可以是执行 sqlcmd
的批处理)。
What would be the best way to deploy upgrades to a piece of software with the following requirements:
The upgrade:
- Must be run from a client machine, not a server.
- Must Show a dialog to select a network location and copy files to a share.
- Must show a dialog to enter SQL Server connection information and the upgrade must connect to SQL Server to run an upgrade script.
- Must not change anything on the client machine from which the upgrade is run. (Nothing in Add/Remove programs, registry, etc. I.e. no Windows Installer.)
- Must not rely on any additional dlls or frameworks. The user must be able to download a single file and run it from Windows XP SP2 without having to install anything else.
Some things I have looked into:
- Batch files (can’t show a dialog to allow the user to enter connection information)
- OSQL (can’t show a dialog and can’t copy files)
- WiX (runs on top of Windows Installer so it puts things on the client machine from which it is run)
- Custom C#/VB app (requires .NET framework)
- Winzip/WinRAR (can't show a dialog, can’t run SQL Scripts)
解决方案
If you don't want to rely on any dlls and frameworks, you should make a native app, this can be, for example, custom winrar sfx (you can run additional scripts after extraction, this can be a batch that executes sqlcmd
).
这篇关于正确的部署工具来复制文件&运行SQL脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文