我刚刚从运行 Windows 7 获得了一台新的工作 PC。我已经安装了 SQL Server 2008,并且我有一个运行 OSQL 命令的批处理文件,如下所示:
osql -S MyServer -E -d MSDB -n -o results.txt -i MyScript.sql
出于某种原因,它在下面给了我例外:
Specified driver could not be loaded due to system error 126: The specified module could not be found. (SQL Server Native Client 10.0, C:\Windows\system32\sqlncli10.dll).
我不确定问题是什么,我什至尝试使用“以管理员身份运行”运行批处理文件。