iot edge sql

Newbie 41 Reputation points
2020-12-24T08:03:43.763+00:00

Hi everybody,
Device such as raspberry can run sql server locally using azure sql edge. However, is it possible to connect to azure sql database hosted in cloud using pyodbc inside modules.
Thanks

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
561 questions
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 31,211 Reputation points MVP
    2020-12-24T13:59:17.397+00:00

    Hello @Newbie ,

    To access Sql Azure in the azure cloud, you need to provide public access from the internet.

    Did you look at these firewall settings?

    Keep in mind that if you are able to access the database, the whole world can access it. Only eg. the credentials and IP filtering keeps your database secure.

    Three alternative ways are:

    1. Hiding your database behind a Rest API (eg. an Azure Function with HTPPTrigger (secured over HTTPS))
    2. A more elaborate roundtrip where your device sends a request in a telemetry message and the response is sent eg in a direct method
    3. Sql Azure support for a virtual network

    The second solution could be challenging but you make use of the single secure channel which is already setup by the IoT edge.


0 additional answers

Sort by: Most helpful