| title | Obtain the Connection String from the Azure Portal | ||
|---|---|---|---|
| description | Use the Azure portal to obtain the connection string that's necessary for your client program to interact with Azure SQL Database. | ||
| author | dalechen | ||
| ms.author | ninarn | ||
| ms.reviewer | randolphwest | ||
| ms.date | 01/14/2025 | ||
| ms.service | azure-sql-database | ||
| ms.topic | include | ||
| keywords |
|
||
| ms.custom |
|
Use the Azure portal to obtain the connection string that's necessary for your client program to interact with Azure SQL Database.
-
Select All services > SQL databases.
-
Enter the name of your database into the filter text box near the upper left of the SQL databases pane.
-
Select the row for your database.
-
After the pane appears for your database, for visual convenience select the Minimize buttons to collapse the blades you used for browsing and database filtering.
-
On the pane for your database, select Show database connection strings.
-
Copy the appropriate connection string. For example, if you intend to use the ADO.NET connection library, copy the appropriate string from the ADO.NET tab.
:::image type="content" source="media/sql-database-include-connection-string-20-portalshots/connqry-connstr-b.png" alt-text="Screenshot showing how to copy the ADO connection string for your database." lightbox="media/sql-database-include-connection-string-20-portalshots/connqry-connstr-b.png":::
-
Edit the connection string as needed. In this example, insert your password into the connection string, or remove
<server-name>from the username if the username or server name are too long. -
In one format or another, paste the connection string information into your client program code.
For more information, see Connection strings and configuration files.