troubleshooting Question

Access is denied when stopping SSRS via SQL job

Avatar of E_Gordon
E_Gordon asked on
Microsoft SQL ServerMicrosoft SQL Server 2005SSRS
3 Comments1 Solution1026 ViewsLast Modified:
So, I have a .dtsx package that contains two steps; VB script to stop, then restart, the local Report Server service.  I can execute this package and everything works as-expected.  

I have created a SQL Server Agent job to call this package.

When the job runs, it fails with:
"...System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Cannot open ReportServer service on computer '.'. ---> System.ComponentModel.Win32Exception: Access is denied     --- End of inner exception stack trace --..."

Based on the "Acces is denied" in there, I am assuming that this is a permissions issue.
My question is:  why does this package run "stand-alone', but fail when called as a SQL job?  (Assuming permissions, but...) More specifically, where/what do I need to change to allow SQL to run the package without error?  I have treid changing the SQL job owner to my own account (which runs the package just fine) and also to the "Log On" account of the service (which is a service account; not "local system"); same result...access is denied.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros