Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running Windows 2008 Server and I have set up a scheduled task that executes a SQL script from the command prompt. The script and command work completely fine.

I set this scheduled task to run once a day, under the Administrator user account and it has been working fine for over a week. I now want to disable the Administrator account and run the scheduled task as another user (with exactly the same privileges i.e. Users, Administrators).

When I change the user for the scheduled task and try to run it. The Task Scheduler tells me that the task has run (Last run result: 0x0) but the script has not been executed.

Scheduled Task information

  • Run whether user is logged in or not (true)
  • Run with highest privileges (true)

tl;dr Changing an already working scheduled task running under Administrator to another user account stops the scheduled task working (user has same role/privileges).

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The problem was that even though the user had Administrator privileges on the Windows Server it did not have sysadmin or dbo privileges on the SQL server DB/instance. By giving my user these privileges on SQL Server the script executed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.