简体   繁体   中英

SSIS package running properly but when it came to SQL server agent it showing Successful but Last email task was not working

Microsoft (R) SQL Server Execute Package Utility Version 10.50.4000.0 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. NULL

When you create a connection in SSIS and provide password for that it encrypt the password with user key.

So if you create the package then the password will be encrypted with your windows user id. And the password is only decrypt-able if the package is run by your windows account.

But when a package is run through Sql Server Agent Job it uses the windows account that is configured for the Sql Server agent. If this account is different than the account you used to create the package then exception like yours is thrown.

There are couple of ways to avoid this exception.

  1. Never save sensitive information in the package. Set "Do not save sensitive" for package protection level. Use configuration or other ways to store the password

  2. Run the Sql Server agent with the user account that created the package.

I prefer the first one.

If your SQL Server is 64 bit

In SQL Server JOB-->Properties-->Steps--->

  1. In the Execution Option Tab -- Check "Use 32 bit runtime"
  2. In the Data Sources Tab -- Uncheck the checkboxes of the connection managers if already checked.
  3. Schedule the Job and run it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM