简体   繁体   English

将SAP hana表复制到Azure SQL数据库得到SQL 找不到服务器

[英]Copy SAP hana table into Azure SQL database and get SQL Server can't be found

I validated data factory and both source dataset and target dataset looks good and validated but as soon as I run pipeline and job hang on there and the error message as below.我验证了数据工厂,源数据集和目标数据集看起来都很好并且经过验证,但是一旦我运行管道和作业就挂在那里并且错误消息如下。

Operation on target Copy data1 failed:对目标 Copy data1 的操作失败:
ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot connect to SQL Server database: 'tcp:mysqlserver2002.database.windows.net,1433', Database: 'mySampleDatabase', User: 'system'. ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=无法连接到 SQL 服务器数据库:'tcp:mysqlserver2002.database.windows.net,1433',数据库:'mySampleDatabase',用户:'system '。 Check the linked service configuration is correct, and make sure the SQL Server database firewall allows the integration runtime to access.检查链接服务配置是否正确,并确保 SQL 服务器数据库防火墙允许集成运行时访问。

Source=Microsoft.DataTransfer.ClientLibrary源=Microsoft.DataTransfer.ClientLibrary
Type=System.Data.SqlClient.SqlException类型=System.Data.SqlClient.SqlException
Message=A network-related or instance-specific error occurred while establishing a connection to SQL Server.消息=与 SQL 服务器建立连接时发生网络相关或特定于实例的错误。 The server was not found or was not accessible.服务器未找到或无法访问。 Verify that the instance name is correct and that SQL Server is configured to allow remote connections.验证实例名称是否正确,并且 SQL 服务器配置为允许远程连接。 (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (提供者:TCP 提供者,错误:0 - 连接尝试失败,因为连接方在一段时间后没有正确响应,或者连接失败,因为连接的主机没有响应。)

Source=.Net SqlClient Data Provider Source=.Net SqlClient 数据提供者
SqlErrorNumber=10060, Class=20, ErrorCode=-2146232060, State=0 SqlErrorNumber=10060,类=20,错误代码=-2146232060,状态=0

Any idea and help will be appreciated任何想法和帮助将不胜感激

Thanks,谢谢,

According you error message, the error happened in Source dataset, Data Factory don't have the permission to access the Source SQL database "mysqlserver2002.database.windows.net".根据您的错误消息,错误发生在源数据集中,数据工厂无权访问源 SQL 数据库“mysqlserver2002.database.windows.net”。

Please test the connection to the Source Azure SQL database like this:请像这样测试与源 Azure SQL 数据库的连接:

在此处输入图像描述

If the connection failed, please check if you have opened the Allow Azure services and resources to access this server on Azrue SQL database firewall settings:如果连接失败,请检查您是否在 Azrue SQL 数据库防火墙设置中打开了允许 Azure 服务和资源访问此服务器

在此处输入图像描述

According my experience for this error, here are the solutions:根据我对此错误的经验,以下是解决方案:

  1. Set Allow Azure services and resources to access this server to yes允许 Azure 服务和资源访问此服务器设置为
  2. Add the client ip(which we could get from the error message) to the database firewall.将客户端 ip(我们可以从错误消息中获取)添加到数据库防火墙。

Another way, please Add a role assignment to Data Factory, then it will permission to access the database:另一种方式,请向数据工厂添加角色分配,然后将权限访问数据库: 在此处输入图像描述

在此处输入图像描述

Hope this helps.希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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