在未安装Sql Server的系统上运行OSQL [英] Run OSQL on systems which do not have Sql Server installed

查看:544
本文介绍了在未安装Sql Server的系统上运行OSQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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

当我在未安装sqlserver的系统上运行此批处理文件时,会引发错误.

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

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

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

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

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

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

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

不胜感激.

推荐答案

您无权重新分发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.

这篇关于在未安装Sql Server的系统上运行OSQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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