简体   繁体   English

将本地Postgresql连接到Azure SQL

[英]Connect On-Premises Postgresql to Azure SQL

I'm wondering if there's a way to have an on-premises PostgreSQL server that can be accessed in Azure the same way as an ordinary PostgreSQL server. 我想知道是否存在一种可以在Azure中访问普通PostgreSQL服务器的本地PostgreSQL服务器的方法。 So to have an endpoint in Azure with port 5432 and that endpoint would forward queries and requests to the on-premises database. 因此,要在具有端口5432的Azure中拥有一个终结点,并且该终结点会将查询和请求转发到本地数据库。

For example I need to keep data on-site but keep the access in Azure the same way through the same interface. 例如,我需要将数据保留在现场,但要通过相同的界面以相同的方式在Azure中进行访问。 We are trying to migrate our compute to Azure but need to keep all our data in house. 我们正在尝试将计算迁移到Azure,但需要将所有数据保留在内部。

I've already looked into Data Factories and On-Premises Data Gateway but both seem to either be for migrating data or for access from App Services and other pre-defined Azure services. 我已经研究过数据工厂和本地数据网关,但它们似乎都是用于迁移数据或用于从App Services和其他预定义的Azure服务进行访问。

We would be accessing from code. 我们将从代码访问。

EDIT : Clarified original question. 编辑 :澄清了原始问题。

Its still not really clear what your trying to do here. 还不清楚您在这里尝试做什么。 However, I can confirm that its possible to access an on premises PostgreSQL instance using the Data Management Gateway in Azure Data Factory. 但是,我可以确认使用Azure Data Factory中的数据管理网关可以访问本地PostgreSQL实例。

If you want to try it out I'd suggest using the copy wizard available from the Azure portal.... 如果您想尝试一下,建议您使用Azure门户提供的复制向导。

在此处输入图片说明

Go through the steps and create a simple pipeline. 完成这些步骤并创建一个简单的管道。

The copy activity could then be scheduled to land your local data in an Azure SQL DB as frequently as 15mins if you wanted. 然后,可以根据需要安排复制活动,以将您的本地数据登陆到Azure SQL数据库中的频率至少为15分钟。

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

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

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