views:

153

answers:

1

Hello, I'm trying to run an SSIS 2005 package from a SQL Server Agent job on my local PC. This package is attempting to connect to a SQL Server 2005 database on a remote server, but it gets the error message, "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'". What is the problem and how can I solve it?

Thank you in advance.

A: 

The problem is that the SSIS package is being executed under the NT credentials of the account running the SQL Server Agent service (likely to be either your local PC's "local system" or "network service" account), and is attempting to connect to the remote SQL instance with windows integrated security. This fails because the remote SQL server cannot authenticate the service account as permitted to connect.

When you developed it, the package was connecting to the remote SQL server using your NT credentials (a domain account which the remote SQL server could authenticate).

The quickest fix will be to change the service account under which your SQL Server Agent service runs to a domain account with rights to connect to the remote SQL server. To prove that this is the issue you could use your own domain account for this, although this isn't really a long term solution.

Ed Harper
Thank you, Ed. This is exaclty what the DBAs just told me to do. What would be the long term solution?
@user317178 - longer-term, the solution would be to get an NT account created specially for the SQL Agent service to run under, which can be granted rights to only those resources actually needed to run the job. You may not need to worry about this unless the job goes onto a production system.
Ed Harper

related questions