Monday, 24 August 2009

Using SQL Azure Database in SQL Management Studio

OK, so I’ve figured it now. You can use SQL Azure Database in SQL Azure Management Studio, you just can’t use object explorer.

So this means you will be able to run queries but not be able to view stored proc lists, tables etc in the Object Explorer window. If you need to do that then you can always use Universal SQL Editor as described in my previous article

So the simplest way of doing this is to

  • When connected to your existing database
    • Click New Query button
    • Within Query Window
      • Right Click and Select Change Connection
        • Enter the server name (including ctp.database.windows.net e.g. servername.ctp.database.windows.net)
        • Select SQL Server Authentication
        • Enter Username (including servername, excluding ctp.database.windows.net e.g chris@servername
        • Enter Password
        • Click Options
          • In Connection Properties Tab
            • Change Connect to Database to database name (e.g. HawaiianShirts), just type it

This will allow you to run queries in SQL Management Studio but not use object explorer

Alternatively you can login as normal but disable object explorer

Tools->Options->(Environment->General)->At Startup = "Open New Query Window" instead of "Open Object Explorer"

No comments: