How to start a DB job by batch file
程序员文章站
2024-02-14 14:27:10
...
Copy below code into atext file, and modify the extension name from txt to bat. ECHO Executing job ECHO. pause osql -U User_ID -P Password -S Server_IP -Q EXEC msdb.dbo.sp_start_job 'DB_Job_Name' ECHO job execution completed pause CLS EXIT
Copy below code into a text file, and modify the extension name from txt to bat.
ECHO Executing job
ECHO.
pause
osql -U "User_ID" -P "Password" -S "Server_IP" -Q "EXEC msdb.dbo.sp_start_job 'DB_Job_Name' "
ECHO job execution completed
pause
CLS
EXIT
上一篇: 实例讲解MySQL数据库的查询优化技术 (1)(2)
下一篇: php setcookie函数失灵