iot edge sql

Newbie 41 Reputation points

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.

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.
527 questions
{count} votes

Accepted answer
  1. Sander van de Velde 28,081 Reputation points MVP

    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