none
How do i select an Azure Database from a local SQL Management studio ? RRS feed

  • Question

  • Hi there i got a question,

    How do i select an Azure Database from a local SQL Management studio  ?

    I seen some ways by adding SQL Server Native Client 11.0, but i don't quite get it

    Can someone explain what way it could be done.

    what i need is a way to make a select statement using the azure database from a local database

    Thanks in advance.


    • Edited by gbobj Tuesday, May 8, 2012 10:16 AM
    Tuesday, May 8, 2012 10:16 AM

Answers

  • Hello,

    It's very similar as to connect to an on-premise server.

    Enter the server name, select "SQL Server Authenfication", enter the user followed with the @databasename of you database and enter the password.

    Click on button "Options >>", in the new tab enter the database name and set the checkbox "Enforce encryption".

    That's all, then you should be able to connect.

    Please remind, you need at least SSMS 2008R2 and the firewall rule of SQL Azure should be set properly.


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing

    Tuesday, May 8, 2012 10:24 AM

All replies

  • Hello,

    It's very similar as to connect to an on-premise server.

    Enter the server name, select "SQL Server Authenfication", enter the user followed with the @databasename of you database and enter the password.

    Click on button "Options >>", in the new tab enter the database name and set the checkbox "Enforce encryption".

    That's all, then you should be able to connect.

    Please remind, you need at least SSMS 2008R2 and the firewall rule of SQL Azure should be set properly.


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing

    Tuesday, May 8, 2012 10:24 AM
  • Hi,

    See if this link is helpful: https://www.windowsazure.com/en-us/develop/net/common-tasks/sql-azure-management/ 

    I hope it helps!!


    If you found this post useful, Please "Mark as Answer" or "Vote as Helpful". Thanks! Vaibhav Gujral.

    Tuesday, May 8, 2012 12:12 PM
  • Hi,

    in SQL Server Management Studio (SSMS) you need to enter die DNS or Hostname of your SQL Server in the Cloud. The Question is: what is your SQL Azure Connection String? To answer this you need to do the following steps:

    1. go to www.windowsazure.com

    2. logon and click in the upper right corner on "Manage"

    3. in the azure management console is on the left a menue item: "Database" click it

    4. on the left has been loaded your Subscription:

    - the first root node is your subscription instance, something lik "Azdex123123"

    -> drill down the navigation tree:

    - the second node is your server name of your SQL instance: something like <asdf45vb>.database.windows.net

    - below you can find you databases

    you only need to take the string "<asdf45vb>.database.windows.net" into your SSMS on standard port 1433. + your configures credentials

    before you can connect to your database 2 things are required:
    a) each Windows Azure Database Server has a Firewall enabled and you need to allow your IP first before you can connect to you db.... "secure by default"
    -> in Windows Azure Management Site, navigate to db server instance and define firewall rules like "allow all" = IP start: 0.0.0.0 ;  IP Range End: 254.254.254.254
    -> in Windows Azure Management Site you have define a SQL administrator account for you database. (select one database in management console and on the right site you can see "Adminstrator login"

    you an can also create other users over adding users in master database.

    5. Launch SSMS and connect to database engine and enter "<asdf45vb>.database.windows.net".

    i hope it helps

    regards

    patrick

    Thursday, May 10, 2012 2:24 PM
  • 1.With Management Studio , connect to master DB with your admin account and change the database you want to use from the list.

    2.On connection specify the name of db you want to connect in default database.

    As far as I know , change database from code is not supported (use , or server .database name usage) due to security reasons.


    P. Velachoutakos

    Saturday, May 12, 2012 12:30 PM
  • You Said

    what I need is a way to make a select statement using the azure database from a local database

    You cannot use , server name , database name inside your script while working with Azure , or use database statements .

    If you want to use the select statement to migrate or update your local data , suggest to create your schema local (if not exists with create statements) and then execute insert statements to insert your data to your local db.

    This scripts can be created from management Studio.

    Alternative with Sync Service can bring Azure DB (or can specify any table ) and work local with live data. (Sync service can perform update every 30 minutes)

    Hope understand correctly .


    P. Velachoutakos

    Wednesday, May 16, 2012 1:10 AM