none
Created a SQL DB in Azure, Opened MS SQL server management studio, but can't see how to connect to this. RRS feed

  • Question

  • HI,

    I have fought to create the above and expected when I  look in connections I'd be able to find something that references my instance of adventure works to practice my SQL with.  Still noting shows.  I have set firewalls and can see the populated tables while in the azure portal, but don't like the SQL editor there.

    Any ideas?

    Sunday, January 5, 2020 8:32 PM

All replies

  • So what did you connect to? If this is an Azure SQL DB, you need to connect to something xyz.databases.windows.net, where xyz is the name you set up in the Azure portal. Note also that you need to connect directly to the database; you cannot switch databases when you are connected. You set the database under the Options button in SSMS.

    If you are connecting to an Azure VM, it should be business as usual, as far as I know.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Sunday, January 5, 2020 9:09 PM
    Moderator
  • Hello Friend,

    You need to give us more infomarking about the error that is occurring.

    If this answer has helped you, mark it helpful so that someone else with a question or similar problem can find an answer or help more easily. Jefferson Clyton Pereira da Silva - [MCSA | MCP | MCTS | MTA | Database Analyst - Sql Server and Oracle]


    Sunday, January 5, 2020 9:49 PM
  • HI,

    I have fought to create the above and expected when I  look in connections I'd be able to find something that references my instance of adventure works to practice my SQL with.  Still noting shows.  I have set firewalls and can see the populated tables while in the azure portal, but don't like the SQL editor there.

    Any ideas?

    Good day <?!?>

    According to your description I assume that you have a working Azure SQL Instance and the AdventureWorks database.

    Let's assume for now that you configured the firewall well and focus on the connection string only

    Please try this:

    1. Navigate to your database in the Azure Portal

    2. On the left menu under "Setting" click on the option "Connection String"

    3. On the page that opened you should see several connections string. You can take the information for connecting from each one of these, but for the sake of the question now select the one under "ADO.NET (SQL authentication)"

    Server=tcp:server-name.database.windows.net,1433;Initial Catalog=database-name;Persist Security Info=False;User ID=user-name;Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;

     

    If you are using your own app this is what you use

    If you are using the latest version of SSMS or ADS then all you need is:

    1. Open SSMS and open create new connection if the windows does not opened for you

    2. In the server name enter the path to the server. In the example anove we will use:
    server-name.database.windows.net

    3. DO NOT Click on connect! Instead click on "Options"

    4. in the connection tab enter the database name (also appear in your connection string as the Initial Catalog. In my example it is:
    database-name

    and click connect

    If all configure well (firewall for example) this should work

    If you have error then please add screenshot of the error


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]

    Sunday, January 5, 2020 11:52 PM
    Moderator
  • Hi sql refresher

    You should have at least one SQL Azure database created and  have a firewall rule set to allow connections from your computer before using SSMS to connect to SQL Azure database. 

    Your SSMS connection UI need to be like below screenshot. mynewserver20170313 is the SQL Azure server name, you can get it from the Dashboard pane in the Microsoft Azure Portal. 

    Please refer to Quickstart: Use SQL Server Management Studio to connect and query an Azure SQL database  and Different Ways to Connect to SQL Azure databases to get more information.

    Best regards,
    Cathy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Monday, January 6, 2020 2:39 AM
  • Hi sql refresher,

    Did you resolve your issue? If you have resolved your issue, please mark the useful reply as answer. This can be beneficial to other community members reading the thread.
    In addition, if you have another questions, please feel free to ask.
    Thanks for your contribution.

    Best regards,
    Cathy 

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by YKN123 Monday, January 13, 2020 8:06 AM
    • Unproposed as answer by YKN123 Monday, January 13, 2020 8:06 AM
    Tuesday, January 7, 2020 6:54 AM
  • Thanks, You have understood my problem and I can follow this, however in the past I have always used ODBC connections,.  Any chance you could explain why you are picking the .net option?

    Helen

    Tuesday, January 7, 2020 11:18 AM
  • Thanks, You have understood my problem and I can follow this, however in the past I have always used ODBC connections,.  Any chance you could explain why you are picking the .net option?

    SSMS uses .NET and SqlClient. It does not use ODBC.

    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    • Proposed as answer by YKN123 Monday, January 13, 2020 8:06 AM
    Tuesday, January 7, 2020 11:35 AM
    Moderator
  • Just got there.  These were the final pieces of the jigsaw!

    Thanks all!

    Tuesday, January 7, 2020 11:41 AM
  • Just got there.  These were the final pieces of the jigsaw!

    Thanks all!

    Hi :-)

    As much as I understand our help solved your needs, so please close the thread by marking the answers

    If there is a following question which was not answered, then please clarify what still open and we will be happy to help


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]


    • Edited by pituachMVP, Moderator Tuesday, January 7, 2020 11:36 PM
    • Proposed as answer by YKN123 Monday, January 13, 2020 8:06 AM
    • Unproposed as answer by YKN123 Monday, January 13, 2020 8:06 AM
    Tuesday, January 7, 2020 11:08 PM
    Moderator