postgresql flexible server on azure with connectivity method set to Private access (VNet Integration). I cant connect on Azure Data studio - How can i do that?

Sebastian Jensen 0 Reputation points
2025-03-20T11:02:56.6166667+00:00

Skærmbillede 2025-03-20 113506

I have a postgresql flexible server on azure with connectivity method set to Private access (VNet Integration). I cant connect on Azure Data studio - How can i do that? I tried configuring my Vnet with a Vitual network gateway and thereafter installing certs on my computer and also connecting with azure vpn. Nothing helps

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Adithya Prasad K 1,380 Reputation points Microsoft External Staff Moderator
    2025-03-20T11:27:48.11+00:00

    Hi Sebastian Jensen
    I'm sorry to hear you're experiencing a connection error. Here’s a breakdown of the situation along with some guidance:

    • Message: "Connection error: connection is bad: Unknown host"
    • Implication: The application is unable to establish a connection to the specified database address.
    • Possible Causes
      Incorrect Server Name: Ensure that the server name you entered is correct. Typographical errors can lead to connection issues.
    • Network Issues: Check your internet connection or firewall settings that might prevent access to the server.
    • Database Status: The database instance may be down or misconfigured.

    Suggestions for Resolution

    • Double-check Credentials: Verify that the server name, username, and password are all accurate.
    • Explore Connectivity: If possible, try pinging the server name from your terminal or command prompt.
    • Verify Server Name:Double-check the server name format: your-server-name.postgres.database.azure.com.
    • Test Connectivity:Use tools like ping or telnet to check if you can reach the server.
    • Check Firewall/Security Settings:Ensure your IP is whitelisted in the database security settings.

    Review Connection String:Revisit connection details, especially the database name, user name, and password.
    I would request you to refer the below mentioned links for more information
    Connect Azure Database for PostgreSQL flexible server with the private access connectivity method
    Azure Database for PostgreSQL flexible server documentation
    I hope this information helps. Please do let us know if you have any further queries. 

    1 person found this answer helpful.

Your answer

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