w0051977
w0051977

Reputation: 15817

Error 0x80070005 Access is denied

I have an SQL Agent Job called: Agent1.

It calls an SSIS package: C:\SSISPackage\ssispackage.dtsx

The error I get is below:

Error 0x80070005 Access is denied.

The Windows user that executes the package obviously does not have access to: C:\SSISPackage\ssispackage.dtsx

How do I find out what Windows user is running this package?

Upvotes: 1

Views: 17868

Answers (3)

Jamal Abo
Jamal Abo

Reputation: 472

I know this question is old, but my solution was different, The problem from the logs was accessing the program cache directory C:\ProgramData\Package Cache,

Error 0x80070005: Failed to secure cache path: C:\ProgramData\Package Cache\

So I changed the permissions for the administrator to gain full access to it and restarted the installation process, and It worked.

Upvotes: 0

w0051977
w0051977

Reputation: 15817

I found the user by looking in Services i.e. right click My Computer, then click Manage, then click Services. There is an SQL server service that is running as a windows user. That is the windows user I was looking for.

Upvotes: 0

Shoeb Siddique
Shoeb Siddique

Reputation: 155

When you read sources, you will find that SQL Agent needs a high level of local access and permissions.

Definintely should have a domain account (if in a domain), and be limited as to network resources. Not a domain admin. Probably not a local admin -however, that is often chosen for ease of use. It is best to 'hand craft' an account with just the right type of permissions for Agent to do its job. If a job needs access to resources, then either Agent will need those permissions, or you will set up an Agent Proxy account. Hope these help.

Configuration -Service Accounts, SQL Server or SQL Server Agent service account http://support.microsoft.com/kb/283811/en-us http://msdn2.microsoft.com/en-us/library/ms143691.aspx

Configuration -Service Accounts,Selecting an Account for the SQL Server Agent Service http://msdn2.microsoft.com/en-us/library/ms191543.aspx http://support.microsoft.com/kb/907557

Please also check the below article. I think this will solve your problem.

How to schedule SSIS package to run as something other than SQL Agent Service Account

https://msdn.microsoft.com/en-us/library/ms186264.aspx

https://msdn.microsoft.com/en-us/library/ms191543.aspx

Upvotes: 1

Related Questions