difference between sql database and managed sql instance

M, Murugeswari (Cognizant) 456 Reputation points
2022-03-16T14:35:41.04+00:00

I came across that we can even query across the database in managed sql instance, Is it really possible... and also want to know what are the advantages over sql database

Azure SQL Database
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Nicolás García Mayo 1 Reputation point
    2022-03-16T14:46:39.1+00:00

    It is really possible ;P

    Azure SQL Database and Azure SQL Managed Instance connect and query articles
    https://learn.microsoft.com/en-us/azure/azure-sql/database/connect-query-content-reference-guide
    APPLIES TO: Azure SQL Database Azure SQL Managed Instance

    1. Sign in to the Azure portal.
    2. Navigate to the database or managed instance you want to query.
    3. On the Overview page, review the fully qualified server name next to Server name for your database in SQL Database or the fully qualified server name (or IP address) next to Host for your managed instance in SQL Managed Instance or your SQL Server instance on your VM. To copy the server name or host name, hover over it and select the Copy icon.

    Quickstart: Use SSMS to connect to and query Azure SQL Database or Azure SQL Managed Instance
    https://learn.microsoft.com/en-us/azure/azure-sql/database/connect-query-ssms?view=sql-server-ver15
    APPLIES TO: Azure SQL Database Azure SQL Managed Instance

    Quickstart: Use Visual Studio Code to connect and query
    https://learn.microsoft.com/en-us/azure/azure-sql/database/connect-query-vscode?view=sql-server-ver15
    APPLIES TO: Azure SQL Database Azure SQL Managed Instance

    Azure SQL Database Creation - Azure SQL vs managed instance vs SQL VM - Part 1
    https://www.youtube.com/watch?v=uNvk42lSI7c

    Best regards.

    0 comments No comments

  2. Oury Ba-MSFT 20,911 Reputation points Microsoft Employee Moderator
    2022-03-16T16:02:27.05+00:00

    Hi @Anonymous Thank you for posting your question on Microsoft Q&A and for using Azure services.

    My understanding is that you are asking if cross database queries is possible in Azure SQL Managed Instance. Please correct me if my understanding is wrong.
    Cross Database queries is possible both in Azure SQL managed Instance and Azure SQL Database.

    For Managed Instance, you can create linked servers to do a cross database queries.
    Please clarify the following ask. "What are the advantages over Azure SQL"
    What is your scenario?

    https://techcommunity.microsoft.com/t5/azure-database-support-blog/cross-database-query-in-azure-sql-database/ba-p/369126

    Regards,
    Oury


  3. Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
    2022-03-16T16:03:54.56+00:00

    Cross database queries on Azure Managed Instance can be used the same as a traditional SQL Server instance. On Azure SQL Database you can use Elastic Queries to create cross database queries, but in terms of performance is maybe better to have all your current databases on one Azure SQL Database (different schemas for each database) than using elastic queries.

    Please see the following article comparing these options:

    Feature comparison of Azure SQL Database, Azure SQL Managed Instance and SQL Server on a VM.

    0 comments No comments

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.