问题
I have a client using Azure database to store their data. I have developed SSIS packages to do the ETL and deployed the project to a local machine. The packages ran perfectly if I right click on a package and hit execute.
The project connection manager I used for loading the data to Azure database is an ADO.NET connection manager. The Authentication Mode is "Active Directory Integrated Authentication".
When I run these packages using SQL Server Agent it throws connection error shown below:
"Execute SQL Task:Error: Failed to acquire connection "Project Connection". Connection may not be configured correctly or you may not have the right permissions on this connection."
I did some research and found out that SQL Server Agent uses a different account that may not have permission from Azure. For reference, please check out the article on following link:
https://gregcaporale.wordpress.com/2012/08/03/using-proxies-in-sql-server-agent/
Base on this article, I need to create a new credential under Security/Credential on SSMS, using my windows login as context. Then create a new proxy named "Test_Proxy" under SQL Server Agent/ Proxies, using the newly created credential. In "Active to the following subsystems", I chose "SQL Server Integration Service Package". In "Principals" page, I selected everything for "SQL login", "Msdb role" and "Server Role".
Eventually, in creation of a SQL Server Agent job, I chose "Test_Proxy" under "Run as" (Shown in the picture) and ran the job, the job failed again.
There is an error message when I check the "Job History" of the job, the message says:
"The job failed. The Job was invoked by User DOMIAN\USER_NAME. The last step to run was step 1 (d)."
Any idea or suggestion will help.
来源:https://stackoverflow.com/questions/61197952/using-proxy-to-give-sql-server-agent-windows-credential-to-access-to-azure-db-no