在未安装 Sql Server 的系统上运行 OSQL

发布于 2024-09-30 21:18:15 字数 328 浏览 0 评论 0原文

我有一个运行 oSQL 命令的批处理文件(如下)。

oSQL -U devUID -P testPwd -S testServer -d testDb  -Q "EXEC [dbo].[sprocTEST]" 

当我在未安装 sqlserver 的系统上运行此批处理文件时,它会抛出错误。

“找不到 odbc 驱动程序管理器数据源名称,并且未指定默认驱动程序 osql”

注意:除了我还复制的批处理文件 - osql.exe 、 osql.rll

有谁知道如何解决 odbc 驱动程序错误吗?

非常感谢帮助。

I have a batch file which runs an oSQL command (below).

oSQL -U devUID -P testPwd -S testServer -d testDb  -Q "EXEC [dbo].[sprocTEST]" 

When I run this batch file on systems which do not have sqlserver installed, it throws an error.

"odbc driver manager data source name not found and no default driver specified osql"

NOTE: Apart from the batch file I also copied - osql.exe , osql.rll

Does any one know how to resolve the odbc driver error?

Help much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心病无药医 2024-10-07 21:18:15

您无权重新分发 osql.exeosql.rll,因此无法复制它们。计算机必须安装来自有效分发源的 SQL Server 客户端工具,否则就违法了。 ODBC 驱动程序由 MDAC

You don't have the rights to redistribute osql.exe nor osql.rll, so you cannot copy them. The computer must install the SQL Server client tools from a valid distribution source, or you're breaking the law. The ODBC drivers are installed by MDAC.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文