Azure SQL Database elastic query on Azure SQL Database emulator

Hubert Zięciak 15 Reputation points
2024-01-12T09:58:55.0933333+00:00

Hi. Is it possible to use Azure SQL Database elastic query (https://learn.microsoft.com/en-us/azure/azure-sql/database/elastic-query-overview) on an Azure SQL Database emulator (https://learn.microsoft.com/en-us/azure/azure-sql/database/local-dev-experience-sql-database-emulator)? I installed an Azure SQL Database emulator and followed the instructions in Elastic Query getting started article and during execute:

CREATE EXTERNAL DATA SOURCE MyElasticDBQueryDataSrc WITH
    (TYPE = RDBMS,
    LOCATION = 'XXX',
    DATABASE_NAME = 'Customers',
    CREDENTIAL = ElasticDBQueryCred
) ;

I get an error

Msg 102, Level 15, State 1, Line 2
Incorrect syntax near 'RDBMS'.

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
    2024-01-12T12:53:18.26+00:00

    Well, it seems to work on my test if you try to connect to a real Azure SQL Database.

    Make sure you create a DATABASE SCOPED CREDENTIAL with its identity and secret.

    The Location on the CREATE EXTERNAL DATA SOURCE should be 'logicalservername.database.windows.net'.


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.