今天想尝试怎么运用python进入sql server 的单用户模式,我尝试的语句如下:
subprocess.call('sqlservr.exe -c -f -m')
在命令提示符中运行,结果
报错如下:
Traceback (most recent call last):
File "test.py", line 6, in <module>
subprocess.call('sqlservr.exe -c -f -m')
File "C:\Python27\lib\subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 394, in init
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
求:大神指教!
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/887/viewspace-3129187/ ,如需转载,请注明出处,否则将追究法律责任。