Run OSQL on systems which do not have Sql Server installed

血红的双手。 提交于 2019-12-13 05:19:33

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/4128909/run-osql-on-systems-which-do-not-have-sql-server-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!