![](/img/trans.png)
[英]SSIS parent doesn't need password but child packages do - how do I get this to run in SQL server Agent?
[英]Which snapins do I need to run sql server powershell?
我需要作为批处理文件或Windows计划任务来运行sql server powershell脚本(使用invoke-sqlcmd)的哪些管理单元或初始化程序?
我尝试了以下方法:
# mysqlscript.ps1
. "D:\Posh\init-sql.ps1"
invoke-sqlcmd .....
其中,init-sql.ps1是Microsoft所描述的提供程序初始化(请参阅将SQL Server管理单元添加到Windows PowerShell中 )。
然后,我尝试了以下方法:
powershell.exe -noe "D:\Posh\mysqlscript.ps1"
发生的只是打开powershell命令提示符。 我很确定不会执行invoke-sqlcmd。
谢谢Emi
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.