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.