Using Proxy to give SQL Server Agent windows credential to access to azure db not working

旧巷老猫 提交于 2020-04-18 00:49:35

问题


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. Job Creation

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!