Windows Scheduled Tasks and Permissions

Here's my construct:
1. I created a BAT file named EXEC_spRTMaster.bat that calls a SQL Server command named SQLCMD (which in turn runs a sproc named spRTMaster).  When called manually, the BAT file runs successfully.
2. I created a Windows Scheduled Task to call EXEC_spRTMaster.bat.  When the Windows Scheduled Task is associated with account in Domain Admins, it runs successfully.
3. I created a Domain User account named RTScheduler.  I gave RTScheduler full permissions to the Scheduled Task.  I also gave RTScheduler full permissions to the folder containing EXEC_spRTMaster.bat.  
4. Yet, when I run the Scheduled Task while its associated with RTScheduler as the user, EXEC_spRTMaster.bat does not run.

It seems like I still need to grant another permission somewhere?  Or, perhaps there's another process (associated with a different domain account) that's sneaking into the process?
jdanaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

stehardy88Commented:
It's definatly a permissions issue. Does the Domain Users account you created have the correct permissions to the SQL Server?

Try giving the Domain Users account Administrative Access to the SQL Server (or Database you are running the command on) and then try again.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jdanaAuthor Commented:
I didn't give RTScheduler permissions on SQL Server because SQLCMD is run by sqlservr.exe and it's associated with the Local System account (which in turn is a member of sysadmin role on SQL Server).  It sure can't hurt, however.  I'll give it a shot.

Too many layers!
0
jdanaAuthor Commented:
stehardy88,

It worked.  I'm stumped.  I still don't get why RTScheduler needed any kind of SQL permission.  Maybe if it's calling the BAT file via Windows Scheduler, it's taking over for Local System?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Forefront ISA Server

From novice to tech pro — start learning today.