Executing a stored procedure using Windows task Scheduler

后端 未结 2 1055
执笔经年
执笔经年 2020-12-10 13:49

I\'ve been trying to set up a schedule to run a stored procedure every hour in Windows Task Scheduler (as I\'m using SQL Express and can\'t install 3rd party tools) but afte

2条回答
  •  没有蜡笔的小新
    2020-12-10 14:18

    I have recently had a similar issue and my experience may assist you. I was calling a small app i.e. EXE from a batch file. I was scheduling the batch file to run from the Windows Task Scheduler. The app was accessing the SQL data using Windows Authentication. I could run the app directly i.e. click on the EXE to run it. I could run the app from the batch file. But if I tried to run the scheduled task it seemed to start but did nothing and posted no errors that I could find. I found if I changed the app to run with SQL Authentication it could be run from the Task Scheduler.

    I suspect there is something about the context of the Windows Authentication when it is run from Task Scheduler that is not recognised by SQL.

提交回复
热议问题