Skip to content

Commit 312ebf4

Browse files
author
stevestein
committed
sqldb - update query editor page
1 parent f90d6d9 commit 312ebf4

File tree

1 file changed

+35
-39
lines changed

1 file changed

+35
-39
lines changed

articles/sql-database/sql-database-connect-query-portal.md

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,80 +11,76 @@ ms.topic: quickstart
1111
author: Ninarn
1212
ms.author: ninarn
1313
ms.reviewer: carlrab
14-
ms.date: 10/24/2019
14+
ms.date: 03/05/2020
1515
---
16-
# Quickstart: Use the Azure portal's SQL query editor to connect and query data
16+
# Quickstart: Use the Azure portal's SQL Database Query Editor to query a SQL database
1717

18-
The SQL query editor is an Azure portal browser tool providing an easy way to execute SQL queries on your Azure SQL Database or Azure SQL Data Warehouse. In this quickstart, you'll use the query editor to connect to a SQL database and then run Transact-SQL statements to query, insert, update, and delete data.
18+
The query editor is a tool in the Azure portal for executing SQL queries against your Azure SQL Database or Azure SQL Data Warehouse. In this quickstart, you'll use the query editor to run Transact-SQL (T-SQL) statements to query, insert, update, and delete data.
1919

2020
## Prerequisites
2121

2222
To complete this tutorial, you need:
2323

24-
- An Azure SQL database. You can use one of these quickstarts to create and then configure a database in Azure SQL Database:
24+
- The AdventureWorksLT sample SQL Database. If you don't have the AdventureWorksLT SQL Database, use one of the following quickstarts to quickly create it:
2525

2626
|| Single database |
2727
|:--- |:--- |
2828
| Create| [Portal](sql-database-single-database-get-started.md) |
2929
|| [CLI](scripts/sql-database-create-and-configure-database-cli.md) |
3030
|| [PowerShell](scripts/sql-database-create-and-configure-database-powershell.md) |
31-
| Configure | [Server-level IP firewall rule](sql-database-server-level-firewall-rule.md)|
3231
|||
3332

3433
> [!NOTE]
3534
> The query editor uses ports 443 and 1443 to communicate. Please ensure you have enabled outbound HTTPS traffic on these ports. You will also need to add your outbound IP address to the server's allowed firewall rules to access your databases and data warehouses.
3635
37-
## Sign in the Azure portal
36+
## Open the SQL Database Query Editor
3837

39-
Sign in to the [Azure portal](https://portal.azure.com/).
38+
1. Sign in to the [Azure portal](https://portal.azure.com/) and select your SQL database.
4039

41-
## Connect using SQL authentication
40+
2. In the **SQL database** menu, select **Query editor (preview)**.
4241

43-
1. Go to the Azure portal to connect to a SQL database. Search for and select **SQL databases**.
42+
![find query editor](./media/sql-database-connect-query-portal/find-query-editor.PNG)
4443

45-
![Navigate to SQL database list, Azure portal](./media/sql-database-connect-query-portal/search-for-sql-databases.png)
4644

47-
2. Select your SQL database.
4845

49-
![Select a SQL database, Azure portal](./media/sql-database-connect-query-portal/select-a-sql-database.png)
46+
## Connect using SQL Authentication
5047

51-
3. In the **SQL database** menu, select **Query editor (preview)**.
48+
1. In the **Login** page, under the **SQL server authentication** label, enter a **Login** and **Password** for a user that has access to the database. If you're not sure, use the login and password for the Server admin of the database's server.
5249

53-
![find query editor](./media/sql-database-connect-query-portal/find-query-editor.PNG)
50+
![sign in](./media/sql-database-connect-query-portal/login-menu.png)
5451

55-
4. In the **Login** page, under the **SQL server authentication** label, enter the **Login** ID and **Password** of the server admin account used to create the database. Then select **OK**.
52+
2. Select **OK**.
5653

57-
![sign in](./media/sql-database-connect-query-portal/login-menu.png)
5854

5955
## Connect using Azure Active Directory
6056

61-
Configuring an Azure Active Directory (Azure AD) administrator enables you to use a single identity to sign in to the Azure portal and your SQL database. Follow the steps below to configure an Azure AD admin for your SQL server.
57+
Configuring an Azure Active Directory (Azure AD) administrator enables you to use a single identity to sign in to the Azure portal and your SQL database. To connect to your database using Azure AD, follow the steps below to configure an Azure AD admin for your SQL server.
6258

6359
> [!NOTE]
6460
> * Email accounts (for example, outlook.com, gmail.com, yahoo.com, and so on) aren't yet supported as Azure AD admins. Make sure to choose a user created either natively in the Azure AD, or federated into the Azure AD.
6561
> * Azure AD admin sign in doesn't work with accounts that have 2-factor authentication enabled.
6662
67-
1. On the Azure portal menu or from the **Home** page, select **All resources**.
68-
69-
2. Select your SQL server.
63+
1. In the Azure portal, select your SQL server.
7064

71-
3. From the **SQL server** menu, under **Settings**, select **Active Directory admin**.
65+
2. On the **SQL server** menu, select **Active Directory admin**.
7266

73-
4. From the SQL server **Active Directory admin** page toolbar, select **Set admin** and choose the user or group as your Azure AD admin.
67+
3. On the SQL server **Active Directory admin** page toolbar, select **Set admin** and choose the user or group as your Azure AD admin.
7468

7569
![select active directory](./media/sql-database-connect-query-portal/select-active-directory.png)
7670

77-
5. From the **Add admin** page, in the search box, enter a user or group to find, select it as an admin, and then choose the **Select** button.
71+
4. On the **Add admin** page, in the search box, enter a user or group to find, select it as an admin, and then choose the **Select** button.
72+
73+
5. Back in the SQL server **Active Directory admin** page toolbar, select **Save**.
7874

79-
6. Back in the SQL server **Active Directory admin** page toolbar, select **Save**.
75+
### Connect to the database
8076

81-
7. In the **SQL server** menu, select **SQL databases**, and then select your SQL database.
77+
6. In the **SQL server** menu, select **SQL databases**, and then select your SQL database.
8278

83-
8. In the **SQL database** menu, select **Query editor (preview)**. In the **Login** page, under the **Active Directory authentication** label, a message appears saying you have been signed in if you're an Azure AD admin. Then select the **Continue as** *\<your user or group ID>* button.
79+
7. In the **SQL database** menu, select **Query editor (preview)**. In the **Login** page, under the **Active Directory authentication** label, a message appears saying you have been signed in if you're an Azure AD admin. Then select the **Continue as** *\<your user or group ID>* button. If the page indicates that you have not successfully logged in, you may need to refresh the page.
8480

85-
## View data
81+
## Run a query to view data
8682

87-
1. After you're authenticated, paste the following SQL in the query editor to retrieve the top 20 products by category.
83+
1. Paste the following query into the query editor:
8884

8985
```sql
9086
SELECT TOP 20 pc.Name as CategoryName, p.name as ProductName
@@ -93,13 +89,13 @@ Configuring an Azure Active Directory (Azure AD) administrator enables you to us
9389
ON pc.productcategoryid = p.productcategoryid;
9490
```
9591

96-
2. On the toolbar, select **Run** and then review the output in the **Results** pane.
92+
2. Select **Run** and then review the output in the **Results** pane.
9793

9894
![query editor results](./media/sql-database-connect-query-portal/query-editor-results.png)
9995

100-
## Insert data
96+
## Run a query to insert data
10197

102-
Run the following [INSERT](https://msdn.microsoft.com/library/ms174335.aspx) Transact-SQL statement to add a new product in the `SalesLT.Product` table.
98+
Run the following [INSERT](/sql/t-sql/statements/insert-transact-sql/) Transact-SQL statement to add a new product in the `SalesLT.Product` table.
10399

104100
1. Replace the previous query with this one.
105101

@@ -127,9 +123,9 @@ Run the following [INSERT](https://msdn.microsoft.com/library/ms174335.aspx) Tra
127123
2. Select **Run** to insert a new row in the `Product` table. The **Messages** pane displays **Query succeeded: Affected rows: 1**.
128124

129125

130-
## Update data
126+
## Run a query to update data
131127

132-
Run the following [UPDATE](https://msdn.microsoft.com/library/ms177523.aspx) Transact-SQL statement to modify your new product.
128+
Run the following [UPDATE](/sql/t-sql/queries/update-transact-sql/) Transact-SQL statement to modify your new product.
133129

134130
1. Replace the previous query with this one.
135131

@@ -141,9 +137,9 @@ Run the following [UPDATE](https://msdn.microsoft.com/library/ms177523.aspx) Tra
141137

142138
2. Select **Run** to update the specified row in the `Product` table. The **Messages** pane displays **Query succeeded: Affected rows: 1**.
143139

144-
## Delete data
140+
## Run a query to delete data
145141

146-
Run the following [DELETE](https://msdn.microsoft.com/library/ms189835.aspx) Transact-SQL statement to remove your new product.
142+
Run the following [DELETE](/sql/t-sql/statements/delete-transact-sql/) Transact-SQL statement to remove your new product.
147143

148144
1. Replace the previous query with this one:
149145

@@ -159,19 +155,19 @@ Run the following [DELETE](https://msdn.microsoft.com/library/ms189835.aspx) Tra
159155

160156
There are a few things to know when working with the query editor.
161157

162-
* The query editor uses ports 443 and 1443 to communicate. Please ensure you have enabled outbound HTTPS traffic on these ports. You will also need to add your outbound IP address to the server's allowed firewall rules to access your databases and data warehouses.
158+
* The query editor uses ports 443 and 1443 to communicate. Ensure you have enabled outbound HTTPS traffic on these ports. You will also need to add your outbound IP address to the server's allowed firewall rules to access your databases and data warehouses.
163159

164-
* Pressing F5 refreshes the query editor page and any query being worked on is lost.
160+
* Pressing **F5** refreshes the query editor page and any query being worked on is lost.
165161

166162
* Query editor doesn't support connecting to the `master` database.
167163

168164
* There's a 5-minute timeout for query execution.
169165

170166
* The query editor only supports cylindrical projection for geography data types.
171167

172-
* There's no support for IntelliSense for database tables and views. However, the editor does support autocomplete on names that have already been typed.
168+
* There's no support for IntelliSense for database tables and views, but the editor does support autocomplete on names that have already been typed.
173169

174170

175171
## Next steps
176172

177-
To learn more about the Transact-SQL supported in Azure SQL databases, see [Resolving Transact-SQL differences during migration to SQL Database](sql-database-transact-sql-information.md).
173+
To learn more about the Transact-SQL (T-SQL) supported in Azure SQL databases, see [Resolving Transact-SQL differences during migration to SQL Database](sql-database-transact-sql-information.md).

0 commit comments

Comments
 (0)