Connecting to Azure Cosmos DB using ODBC

Anonymous
2023-07-10T18:46:56.13+00:00

How to connect an on-premises Linux server to a cloud Azure Cosmos DB using ODBC? Would an internet connection be required?

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,901 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AirGordon 7,150 Reputation points
    2023-07-10T19:09:55.85+00:00

    You don't need to expose CosmosDb over the internet, CosmosDb supports Private Link. Resources mapped to Private Link are also accessible on-premises over private peering through VPN or Azure ExpressRoute.

    For leveraging ODBC to connect to the CosmosDb, see this guide https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/odbc-driver#install-the-odbc-driver-and-connect-to-your-database

    1 person found this answer helpful.

  2. Sedat SALMAN 14,180 Reputation points MVP
    2023-07-10T19:05:59.89+00:00

    You need to install IDBC Driver to the Linux first

    https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/odbc-driver

    But as you can see there is an ODBC driver for Linux available by Microsoft but you can find it from a third-party vendor

    The following link gives you a tutorial about how to connect from a Linux machine to cosmos db via phyton

    https://www.cdata.com/kb/tech/cosmosdb-odbc-python-linux.rst

    instead you can install azure-cosmos with pip on your system and you can connect by using it

    pip install azure-cosmos
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.