Skip to content

Commit aa3c128

Browse files
author
stevestein
committed
sqldb - format fix
1 parent c8fee62 commit aa3c128

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed
32.9 KB
Loading

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

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ ms.date: 03/12/2020
1515
---
1616
# Quickstart: Use the Azure portal's query editor to query a SQL database
1717

18-
The query editor is a tool in the Azure portal for running SQL queries against your Azure SQL Database or Azure SQL Data Warehouse.
18+
The query editor is a tool in the Azure portal for running SQL queries against your Azure SQL database or Azure SQL Data Warehouse.
1919

20-
In this quickstart, you'll use the query editor in the portal to run Transact-SQL (T-SQL) queries against an Azure SQL database.
20+
In this quickstart, you'll use the query editor to run Transact-SQL (T-SQL) queries against an Azure SQL database.
2121

2222

2323
## Prerequisites
2424

25-
To complete this quickstart you need the AdventureWorksLT sample database. If you don't have a working copy of the AdventureWorksLT SQL Database, the following quickstart quickly creates one:
25+
Completing this quickstart requires the AdventureWorksLT sample database. If you don't have a working copy of the AdventureWorksLT SQL database, the following quickstart quickly creates one:
2626

2727
- [Quickstart: Create a single Azure SQL database using the Azure portal, PowerShell, or Azure CLI](sql-database-single-database-get-started.md)
2828

2929
### Configure network settings
3030

31-
If you get one of the following errors in the query editor: *Your local network settings might be preventing the Query Editor from issuing queries. Please click here for instructions on how to configure your network settings*, or *A connection to the server could not be established. This might indicate an issue with your local firewall configuration or your network proxy settings.*. The following important information should help with these errors:
31+
If you get one of the following errors in the query editor: *Your local network settings might be preventing the Query Editor from issuing queries. Please click here for instructions on how to configure your network settings*, or *A connection to the server could not be established. This might indicate an issue with your local firewall configuration or your network proxy settings*, the following important information should help resolve:
3232

3333
> [!IMPORTANT]
3434
> The query editor uses ports 443 and 1443 to communicate. Ensure you have enabled outbound HTTPS traffic on these ports. You also need to [add your outbound IP address to the server's allowed firewall rules](sql-database-server-level-firewall-rule.md) to access your databases and data warehouses.
@@ -43,10 +43,11 @@ If you get one of the following errors in the query editor: *Your local network
4343
![find query editor](./media/sql-database-connect-query-portal/find-query-editor.PNG)
4444

4545

46+
## Establish a connection to the database
4647

47-
## Connect using SQL Authentication
48+
Even though you're signed into the portal, you still need to provide credentials to access the SQL database. You can connect using SQL authentication or Azure Active Directory to connect to your database.
4849

49-
Even though you're signed into the portal, you still need to provide credentials to access the SQL database. If you use Azure Active Directory to connect to your database, skip to [the following section](#connect-using-azure-active-directory).
50+
### Connect using SQL Authentication
5051

5152
1. In the **Login** page, under **SQL server authentication**, 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.
5253

@@ -55,15 +56,15 @@ Even though you're signed into the portal, you still need to provide credentials
5556
2. Select **OK**.
5657

5758

58-
## Connect using Azure Active Directory
59+
### Connect using Azure Active Directory
5960

6061
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.
6162

6263
> [!NOTE]
6364
> * 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.
6465
> * Azure AD admin sign in doesn't work with accounts that have 2-factor authentication enabled.
6566
66-
### Set an Active Directory admin for the database server
67+
#### Set an Active Directory admin for the database server
6768

6869
1. In the Azure portal, select your SQL server.
6970

@@ -83,7 +84,11 @@ Configuring an Azure Active Directory (Azure AD) administrator enables you to us
8384

8485
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.
8586

86-
## Run a Select query
87+
## Query a SQL database
88+
89+
The following example queries should run successfully against the AdventureWorksLT sample database.
90+
91+
### Run a SELECT query
8792

8893
1. Paste the following query into the query editor:
8994

@@ -100,7 +105,7 @@ Configuring an Azure Active Directory (Azure AD) administrator enables you to us
100105

101106
3. Optionally, you can save the query as a .sql file, or export the returned data as a .json, .csv, or .xml file.
102107

103-
## Run an Insert query
108+
### Run an INSERT query
104109

105110
Run the following [INSERT](/sql/t-sql/statements/insert-transact-sql/) T-SQL statement to add a new product in the `SalesLT.Product` table.
106111

@@ -130,7 +135,7 @@ Run the following [INSERT](/sql/t-sql/statements/insert-transact-sql/) T-SQL sta
130135
2. Select **Run** to insert a new row in the `Product` table. The **Messages** pane displays **Query succeeded: Affected rows: 1**.
131136

132137

133-
## Run an Update query
138+
### Run an UPDATE query
134139

135140
Run the following [UPDATE](/sql/t-sql/queries/update-transact-sql/) T-SQL statement to modify your new product.
136141

@@ -144,7 +149,7 @@ Run the following [UPDATE](/sql/t-sql/queries/update-transact-sql/) T-SQL statem
144149

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

147-
## Run a Delete query
152+
### Run a DELETE query
148153

149154
Run the following [DELETE](/sql/t-sql/statements/delete-transact-sql/) T-SQL statement to remove your new product.
150155

0 commit comments

Comments
 (0)