--- title: "Set up Azure Relay for Database connection" slug: "set-up-azure-relay-for-database-connection-data-migration" tags: ["Flow topic"] status: "update" updated: 2026-09-16T13:18:55Z published: 2026-09-22T13:19:01Z canonical: "docs.staedean.com/set-up-azure-relay-for-database-connection-data-migration" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Set up Azure Relay for Database connection You can connect D365 F&SCM to an external on-premises database. If you connect to an external on-premises database, you must connect through firewalls. With Connectivity studio, you can connect to an external on-premises database using an Azure Relays. To establish a connection between an external on-premises database and D365 F&SCM with Connectivity studio, these elements must be in place: 1. Azure Relays namespace. 2. BIS Azure Relays client installed on the external on-premises server. 3. Data Source Name (DSN) on external on-premises server. 4. Database connector and ODBC document in Connectivity studio on D365 F&SCM. This picture gives an architectural overview of the Azure Relays solution in Connectivity studio with the required elements. (Note: The numbers in the picture correspond with the before-mentioned element numbers.): ![](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/Azure%20Relays%20for%20Database%20Connection.png) Prerequisites to establish this connection: - Azure subscription. - D365 F&SCM with Connectivity studio installed. - External on-premises server and database. [Embedded content](https://viewer.diagrams.net/?tags=%7B%7D&lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=Set%20up%20Azure%20Service%20Bus%20for%20Database%20connection%20-%20Data%20migration%20.drawio&dark=auto#R%3Cmxfile%3E%3Cdiagram%20name%3D%22Page-1%22%20id%3D%220%22%3E7VhrT9swFP01lbYPkfLoOvaRlo4hbUxaNPHZjW8Tg2NXtvvi1%2B86dl6EAS0MTYhKleNj32vnnBPnKqNkVu7OFVkVPyQFPopDuhslZ6M4jsbRGBuL7B3yZRI5IFeM%2BkktkLJb8GDo0TWjoHsTjZTcsFUfzKQQkJkeRpSS2%2F60peT9VVckhwGQZoQP0StGTeHQk09hi38Dlhf1ylHoR0pST%2FaALgiV2w6UzEfJTElp3FW5mwG35NW8uLivfxltNqZAmKcEaEOUGQb5PNrs61vGMGQXO9NtwQykK5LZkS0KjFhhSo69CC%2BXjPOZ5FJVcclyuYyzDHFtlLyBzkhY%2FZqRmkibg3CWC7zOcEOA06cbUIYh%2F6d%2BoGSU2p1Nl1IY748IyZu6fW8IX%2Ft9p%2B0N2iSw69ygp%2BQcZAlG7XFK0VFt7CXatgpPPFQn%2Bez7%2B34E8fbKm8StAnjhRai6vzWon4tra9I45GQB3IXOFBADiJ3erpVtfwEndoeClKAr8qulOBM3LgITU2JIUBKB9iutlIjITGOTVdkCYnMFymYKmjyBi2K5IoZJ4dLW9jBE33Sp8u552CpKrgUF6rU8zC6LEBKYvLZdDjPGydAY0V1nxH1nNP0DrIHdjjsedMuFwOe4UkaKYKWgZBqPxzi8YoLaww7lAbVh1jRhgP%2FpRTq01tPtxNxyQWexYOuWCvxCwYLpnt8ec1n87rJnu%2ByYA%2BgAlzVnUt9kZ6gsNqlcq8pgl3iyYPPhLL38eMQh1TVVNVdXiasDK6BaPOqk5N1Jz3ZSMnkRJw3KDRD0vyo24pctNub17f37UuPkcIEGatjy2JMPdFDxDgVyT%2FjdurGrG2ZJfVcqU8hcCsLnLTrtP2vtnO9Srjx4DcbsPc1kbWRf8UOeM3Tbqa32rbicaM2yRjTcfg7m%2FiKnI5J9dxm26VPzXMrj4yhvtvlGKI9fkfLkeMrjN0R58oqUj4%2BnPHkjlPu33csTjt32E0E11vnQksz%2FAA%3D%3D%3C%2Fdiagram%3E%3C%2Fmxfile%3E) ## Related - [Set up Database connector](/set-up-database-connector.md) - [Connect D365 F&SCM on-premises database with external database](/connect-d365-fscm-on-premises-database-with-external-database.md)