0

I have SSIS 2012 package which runs SQL command by executing SQLCMD command line utility with -E switch. This switch means that it should use trusted connection to connect to SQL server.

The problem is that if i try to run package directly through Object Explorer, i get ANONYMOUS LOGON error. I get the same error running package using stored procedures.

The only way i can run it is through SQL Server Agent Job which then uses SQL Server Agent login.

The question is how to run package using stored procedures with some user which will be used for trusted connection?

aron
  • 1,874
  • 5
  • 23
  • 29

1 Answers1

0

Two options. For your manual executions, you'll need to use [RunAs][1] command to launch the dtexec process as the desired user. Covered it a bit in this answer Deploying SSIS (SQL Server 2012) Project Outside Network

For scheduled executions, you'll need to create the appropriate stored credentials within SQL Server, authorize those credentials for use with jobs of type SSIS and then create your job using those stored credentials.

Community
  • 1
  • 1
billinkc
  • 59,250
  • 9
  • 102
  • 159