ssisspn

Connection failure running SSIS package from web service


I have an SSIS package with a SQL Connection using the SqlClient Data Provider. Its connection string is set from a variable via an expression.

I have a .NET 4.8 Windows Service hosted on the SSIS server. It runs the SSIS package using the following process:

  1. Call [catalog].[create_execution]
  2. Call [catalog].[set_execution_property_override_value] to set the connection string variable
  3. Call [catalog].[start_execution]

That all works fine.

Now I want to replace that Windows Service with a .NET 8 web service hosted in IIS on a different server.

The package starts, but fails with error:

Failed to acquire connection "MyConnection". Connection may not be configured correctly or you may not have the right permissions on this connection.

Update: if I try opening a .NET SqlConnection from a Script Task, I get

System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

although the task shows it is running as the expected domain account.

Why?


Solution

  • Found the following here:

    SSIS Windows service doesn't support delegation

    SSIS doesn't support the delegation of credentials, sometimes referred to as a double hop. In this scenario, you're working on a client computer, SSIS is installed on a second computer, and SQL Server is installed on a third computer. Although SSMS successfully passes your credentials from the client computer to the second computer (where SSIS is running), SSIS can't delegate your credentials from the second computer to the third computer (where SQL Server is running).