Thursday, May 31, 2007

SQL Agent Man needs a Perm

No, not Ted Malone. And no, not curly hair. But yes, I'm serious.

If you're using SQL Server Agent jobs to execute your SSIS packages on a schedule (and this is something many of us do) then you need to ensure that SQL Server Agent has the necessary permissions, or else you'll get an error like this:
"Executed as user: server\SYSTEM. The package execution failed. The step

I've seen this problem popping up several times lately on the MSDN SSIS Forums, so I thought I'd add a quick note here. There are two main things that you can do to get around this:
  1. Configure the SQL Server Agent service to run in the context of a Windows account that has the necessary permissions. This is simple enough, but doesn't give very granular control, as this will apply to all jobs that run.
  2. Create a SQL Server Agent Proxy and grant that proxy account the necessary permissions.

SQL Server Agent Proxies are new in SQL Server 2005. so not everyone knows about them yet. In my opinion they are the right tool for the job here. They're easy to set up, provide granular access and let you easily follow the principle of least privilege when configuring all of your scheduled SSIS packages.

No comments: