Learn how to connect to your Azure SQL database from SQL Server Management Studio.
SQL Server Management Studio (SSMS) is a powerful, integrated environment for managing any SQL infrastructure, from SQL Server to Azure SQL Database. This tutorial will guide you through the steps to connect to your Azure SQL Database instance using SSMS.
Before you can connect, you need the following details from your Azure SQL Database server:
your_server_name.database.windows.net. You can find this on the Overview page of your Azure SQL Database server in the Azure portal.Open SSMS on your local machine.
In the "Connect to Server" dialog box that appears:
Database Engine.your_server_name.database.windows.net).Click the Connect button.
If the connection is successful, you will see your Azure SQL Database server listed in the Object Explorer pane on the left side of SSMS.
You can expand the server node and then the "Databases" folder to see your database(s).
To run queries, right-click on your database in the Object Explorer and select "New Query".
You can then write and execute T-SQL queries against your Azure SQL Database.
-- Example Query
SELECT @@VERSION;
GO
SELECT TOP 10 * FROM sys.tables;
GO
Now that you can connect to your Azure SQL Database, you can start performing various database operations, such as: