在未安装 SQL Server 的情况下运行 sqlcmd
我正在开发一个调用 sqlcmd
的 Java 程序。它在安装了 SQL Server 的计算机上完美运行,但在未安装 SQL Server 的计算机上根本无法运行。我想在我的 jar 中包含运行此命令所需的 exe 和 dll 文件。有人知道我需要哪些吗?我已经包含了batchparser90.dll、sqlcmd.exe 和sqlcmd.dll。还是没用。
任何建议表示赞赏。提前致谢!
I'm working on a Java program that is calling sqlcmd
. It works perfectly on a computer with SQL server installed, but not at all on a computer that doesn't. I want to include the necessary exe and dll files to run this command in my jar. Anyone know which ones I need? I already included batchparser90.dll, sqlcmd.exe, and sqlcmd.dll. It still didn't work.
Any suggestions are appreciated. Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
虽然对于原始发布者来说可能为时已晚,但为了将来的参考,SQLCMD 是可以免费下载的,因此没有必要为此目的明确购买 SQL Server。据推测,用户拥有带有 CAL 的 SQL Server,否则他们一开始就不需要 SQLCMD。
无论如何,截至我打字时,2008 R2 下载地址如下:
http://www.microsoft.com/en-us/download/details.aspx?id=16978
下载文件:
1033\x64\SqlCmdLnUtils.msi
(编辑 2013- 05-01) 请注意,此时这是一个相当旧的版本 - 请参阅更新链接的评论,或 在 Microsoft 下载中心搜索“Microsoft SQL Server Feature Pack”,然后选择您喜欢的版本 - 最新版本或匹配的版本您正在使用的 SQL Server 版本(您认为合适)。
Although it's probably too late for the original poster, for future reference, SQLCMD is freely downloadable, so it's not necessary to purchase SQL Server explicitly for this purpose. Presumably the user has SQL Server with CALs or they wouldn't need SQLCMD in the first place.
In any event, the 2008 R2 download as of my typing this is here:
http://www.microsoft.com/en-us/download/details.aspx?id=16978
Download the file:
1033\x64\SqlCmdLnUtils.msi
(EDIT 2013-05-01) Please note this is a fairly old release at this point - see the comments for updated links, or search the Microsoft Download Center for "Microsoft SQL Server Feature Pack" and pick the release that you prefer - the most recent or the one that matches your SQL Server version in use, as you see fit.
您可以下载 SQLCMD 并作为独立应用程序运行。请点击链接。
Microsoft SQL 功能包服务器 2005 年 - 2005 年 11 月
You can download SQLCMD and run as a standalone application. Follow the link.
Feature Pack for Microsoft SQL Server 2005 - Nov 2005
有一个免费工具“SQLS*Plus”(在 http://www.memfix.com 上),就像用于 SQL Server 的 SQL*Plus。
数据格式非常灵活(设置行大小、页面大小等)、变量(&、&&)、假脱机等
不确定重新分配权
There is a free tool "SQLS*Plus" (on http://www.memfix.com ) which is like SQL*Plus for SQL Server.
Very flexible with data formatting (set lines size, pagesize, etc), variables (&, &&), spool, etc
Not sure about redistribution rights