What's the connection string I should use for SSMS?

  • Now that I've got an AdventureWorks database in an Azure SQL database, I want to connect to it with SSMS and eventually with an ASP.NET web app using Entity Framework.

    But for the moment, let's keep it to SSMS. I've gone to the Azure portal, opened the SQL resource and found the page for various connection strings. I took the one for ADO.NET and tried putting that into SQL Server Management Studio, but that failed. It uses a transport of TCP. Did I select the wrong connection string? The Azure portal page lists about 8 different connection strings depending upon the technology being used.

    Rod

  • You will need to split out one of those strings into its constituent parts.

    You should have an element which is something like

    Servername.database.windows.net

    This would be what you put in the server name box.

    Authentication will depends what you want to use and how you have configured it.  Eg only use SQL logins or use Entra IDs (AAD) etc.

     

    Then if you are not connecting as a system admin you will need to specify the database name in the additional properties, and select the DB you wish to connect to.

    once done as long as you have your client IP in the firewall you should be able to connect.

     

    any issues post the error and the screen grabs of the ssms connection screen and I’ll see what’s wrong.

  • It should look something like this: hamshackserver.database.windows.net

    You just have to edit 'hamshackserver' to be whatever you named your server instance where the database lives.

    You'll also have to allow your IP address to connect to the server (firewall settings, or SSMS will open a window for you).

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply