我怎样才能使.exe的SQL脚本 [英] How can I make .exe for sql script

查看:240
本文介绍了我怎样才能使.exe的SQL脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

请让我了解如何在支持SQL脚本的情况下制作.exe或补丁安装程序.


Pranav

Dear All,

Please get me knowledge to make .exe or patch installer with support of sql scripts.


Pranav

推荐答案

在最简单的级别上,您可以创建一个批处理文件来运行您的sql脚本.

像这样的东西:
At the simplest level you can create a batch file to run your sql scripts.

Something like:
cd "C:\Program Files\Microsoft SQL Server\100\Tools\Binn"
SQLCMD -E -S .\SQLExpress2008 -i "E:\SQLExpress 2008\Publishers\InstPubs.sql" -o "E:\SQLExpress 2008\Publishers\InstPubs.rpt"



查找 SQLCMD [如此处 [如此处 [ ^ ]

或者,您也可以使用自己选择的语言编写应用程序来为您完成此任务.



Look up SQLCMD[^] here.

You can write a PowerShell script to do it as here[^]

You can use SSMS (Sql Server Management Studio) to schedule a job: as here[^]

Or you can write an application in the language of your choice to do it for you.


您可能实际上想为整个应用程序创建一个exe,并将sql脚本安装包含到项目中.
You might actually want to create an exe for your entire application and include the sql script install into the project.


这篇关于我怎样才能使.exe的SQL脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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