question

SaiHarshaPisapati-3307 avatar image
0 Votes"
SaiHarshaPisapati-3307 asked OuryBa-MSFT commented

Connection String of SQL Managed Instance

I have a scenario where my Azure App Service is connecting to Azure SQL Managed Instance. There are more than one DB inside the Instance.

How do I connect to a particular DB so that I can fetch table's values? I see that the connection string in the portal doesn't have any parameter particularly referring to a DB.

Can I manually add 'Initial Catalog = mydbname ' to the connection string? Will it work?

azure-sql-database
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

cooldadtx avatar image
0 Votes"
cooldadtx answered OuryBa-MSFT commented

Yes the connection string works the same as a regular SQL server, just the server value is different. Refer to the docs on how to connect to a managed instance using the various connection technologies.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SaiHarshaPisapati-3307

Please check answer above provided by @cooldadtxand and let us know if that helped solve your issue. If yes, please mark as accepted answer otherwise let us know how we can better assist you.

Regards,
0ury

0 Votes 0 ·