Hi @Binway ,
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!
Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.
Issue:
Created linked service of a Database which has private endpoints in the ADF that allows to connect pipelines with copy activities to read and write data to the tables in the DB. When creating a new dataset or use an existing dataset using the above linked service - all datasets and the linked service work for the pipeline - but in the dataflow getting the connection error like below when testing source or sink connection.
Cannot connect to SQL database: 'jdbc:sqlserver://server.database.windows.net;database={sqldb-database-prd}', 'Managed Identity (factory name): DF-datafactory'. [SQL Exception]Error Code:47073, Error Message: Reason: An instance-specific error occurred while establishing a connection to SQL Server. Connection was denied since Deny Public Network Access is set to Yes (https://docs.microsoft.com/azure/azure-sql/database/connectivity-settings#deny-public-network-access). To connect to this server, use the Private Endpoint from inside your virtual network (https://docs.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database).
Solution :
Checked the settings at the data flow level and changed to the Private endpoint IR.
The integration runtime used by your data flow should have the necessary network access to the SQL Server. It should be set to the runtime for the Vnet.
Please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.