Skip to content

Commit 01521e6

Browse files
authored
Merge pull request #264482 from AlicjaKucharczyk/patch-4
retirement
2 parents 4c654d3 + d49afd2 commit 01521e6

File tree

2 files changed

+7
-147
lines changed

2 files changed

+7
-147
lines changed

articles/postgresql/single-server/connect-rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.author: sunila
88
author: sunilagarwal
99
ms.devlang: rust
1010
ms.custom: kr2b-contr-experiment
11-
ms.date: 06/24/2022
11+
ms.date: 01/29/2024
1212
---
1313

1414
# Quickstart: Use Rust to interact with Azure Database for PostgreSQL - Single Server
@@ -25,7 +25,7 @@ For this quickstart, you need:
2525

2626
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free).
2727
- A recent version of [Rust](https://www.rust-lang.org/tools/install) installed.
28-
- An Azure Database for PostgreSQL single server. Create one using [Azure portal](./quickstart-create-server-database-portal.md) <br/> or [Azure CLI](./quickstart-create-server-database-azure-cli.md).
28+
- An Azure Database for PostgreSQL single server. Create one using [Azure CLI](./quickstart-create-server-database-azure-cli.md).
2929
- Based on whether you are using public or private access, complete **ONE** of the actions below to enable connectivity.
3030

3131
|Action| Connectivity method|How-to guide|
@@ -322,7 +322,7 @@ fn delete(pg_client: &mut postgres::Client) {
322322
deleted item info: id = 4, name = item-4, quantity = 16
323323
```
324324

325-
4. To confirm, you can also connect to Azure Database for PostgreSQL [using psql](./quickstart-create-server-database-portal.md#connect-to-the-server-with-psql) and run queries against the database, for example:
325+
4. To confirm, you can also connect to Azure Database for PostgreSQL [using psql](./quickstart-create-server-database-azure-cli.md#connect-to-the-azure-database-for-postgresql-server-by-using-psql) and run queries against the database, for example:
326326

327327
```sql
328328
select * from inventory;

articles/postgresql/single-server/quickstart-create-server-database-portal.md

Lines changed: 4 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.topic: quickstart
77
ms.author: sunila
88
author: sunilagarwal
99
ms.custom: mvc, mode-ui
10-
ms.date: 06/24/2022
10+
ms.date: 01/29/2024
1111
---
1212

1313
# Quickstart: Create an Azure Database for PostgreSQL server by using the Azure portal
@@ -16,149 +16,9 @@ ms.date: 06/24/2022
1616

1717
[!INCLUDE [azure-database-for-postgresql-single-server-deprecation](../includes/azure-database-for-postgresql-single-server-deprecation.md)]
1818

19-
Azure Database for PostgreSQL is a managed service that you use to run, manage, and scale highly available PostgreSQL databases in the cloud. This quickstart shows you how to create a single Azure Database for PostgreSQL server and connect to it.
20-
21-
## Prerequisites
22-
23-
An Azure subscription is required. If you don't have an Azure subscription, create a [free Azure account](https://azure.microsoft.com/free/) before you begin.
24-
25-
## Create an Azure Database for PostgreSQL server
26-
27-
Go to the [Azure portal](https://portal.azure.com/) to create an Azure Database for PostgreSQL Single Server database. Search for and select *Azure Database for PostgreSQL servers*.
28-
29-
>[!div class="mx-imgBorder"]
30-
> :::image type="content" source="./media/quickstart-create-database-portal/search-postgres.png" alt-text="Find Azure Database for PostgreSQL.":::
31-
32-
1. Select **+ Create**.
33-
34-
2. On the Create an Azure Database for PostgreSQL page, select **Single server**.
35-
36-
>[!div class="mx-imgBorder"]
37-
> :::image type="content" source="./media/quickstart-create-database-portal/select-single-server.png" alt-text="Select single server":::
38-
39-
3. Now enter the **Basics** form with the following information.
40-
41-
> [!div class="mx-imgBorder"]
42-
> :::image type="content" source="./media/quickstart-create-database-portal/create-basics.png" alt-text="Screenshot that shows the Basics tab for creating a single server.":::
43-
44-
|Setting|Suggested value|Description|
45-
|:---|:---|:---|
46-
|Subscription|your subscription name|select the desired Azure Subscription.|
47-
|Resource group|*myresourcegroup*| A new or an existing resource group from your subscription.|
48-
|Server name |*mydemoserver*|A unique name that identifies your Azure Database for PostgreSQL server. The domain name *postgres.database.azure.com* is appended to the server name that you provide. The server can contain only lowercase letters, numbers, and the hyphen (-) character. It must contain 3 to 63 characters.|
49-
|Data source | None | Select **None** to create a new server from scratch. Select **Backup** only if you were restoring from a geo-backup of an existing server.|
50-
|Admin username |*myadmin*| Enter your server admin username. It can't start with **pg_** and these values are not allowed: **azure_superuser**, **azure_pg_admin**, **admin**, **administrator**, **root**, **guest**, or **public**.|
51-
|Password |your password| A new password for the server admin user. It must contain 8 to 128 characters from three of the following categories: English uppercase letters, English lowercase letters, numbers (0 through 9), and non-alphanumeric characters (for example, !, $, #, %).|
52-
|Location|your desired location| Select a location from the dropdown list.|
53-
|Version|The latest major version| The latest PostgreSQL major version, unless you have specific requirements otherwise.|
54-
|Compute + storage | *use the defaults*| The default pricing tier is **General Purpose** with **4 vCores** and **100 GB** storage. Backup retention is set to **7 days** with **Geographically Redundant** backup option.<br/>Learn about the [pricing](https://azure.microsoft.com/pricing/details/postgresql/server/) and update the defaults if needed.|
55-
56-
> [!NOTE]
57-
> Consider using the Basic pricing tier if light compute and I/O are adequate for your workload. Note that servers created in the Basic pricing tier can't later be scaled to General Purpose or Memory Optimized.
58-
59-
5. Select **Review + create** to review your selections. Select **Create** to provision the server. This operation might take a few minutes.
60-
> [!NOTE]
61-
> An empty database, **postgres**, is created. You'll also find an **azure_maintenance** database that's used to separate the managed service processes from user actions. You can't access the **azure_maintenance** database.
62-
63-
> [!div class="mx-imgBorder"]
64-
> :::image type="content" source="./media/quickstart-create-database-portal/deployment-success.png" alt-text="success deployment.":::
65-
66-
[Having issues? Let us know.](https://aka.ms/postgres-doc-feedback)
67-
68-
## Configure a firewall rule
69-
70-
By default, the server that you create is not publicly accessible. You need to give permissions to your IP address. Go to your server resource in the Azure portal and select **Connection security** from left-side menu for your server resource. If you're not sure how to find your resource, see [Open resources](../../azure-resource-manager/management/manage-resources-portal.md#open-resources).
71-
72-
> [!div class="mx-imgBorder"]
73-
> :::image type="content" source="./media/quickstart-create-database-portal/add-current-ip-firewall.png" alt-text="Screenshot that shows firewall rules for connection security.":::
74-
75-
Select **Add current client IP address**, and then select **Save**. You can add more IP addresses or provide an IP range to connect to your server from those IP addresses. For more information, see [Firewall rules in Azure Database for PostgreSQL](./concepts-firewall-rules.md).
76-
7719
> [!NOTE]
78-
> To avoid connectivity issues, check if your network allows outbound traffic over port 5432. Azure Database for PostgreSQL uses that port.
79-
80-
[Having issues? Let us know.](https://aka.ms/postgres-doc-feedback)
81-
82-
## Connect to the server with psql
83-
84-
You can use [psql](http://postgresguide.com/utilities/psql.html) or [pgAdmin](https://www.pgadmin.org/docs/pgadmin4/latest/connecting.html), which are popular PostgreSQL clients. For this quickstart, we'll connect by using psql in [Azure Cloud Shell](../../cloud-shell/overview.md) within the Azure portal.
85-
86-
1. Make a note of your server name, server admin login name, password, and subscription ID for your newly created server from the **Overview** section of your server.
87-
> [!div class="mx-imgBorder"]
88-
> :::image type="content" source="./media/quickstart-create-database-portal/overview-new.png" alt-text="get connection information.":::
89-
90-
2. Open Azure Cloud Shell in the portal by selecting the icon on the upper-left side.
91-
92-
> [!NOTE]
93-
> If you're opening Cloud Shell for the first time, you'll see a prompt to create a resource group and a storage account. This is a one-time step and will be automatically attached for all sessions.
94-
95-
> [!div class="mx-imgBorder"]
96-
> :::image type="content" source="media/quickstart-create-database-portal/use-in-cloud-shell.png" alt-text="Screenshot that shows server information and the icon for opening Azure Cloud Shell.":::
97-
98-
3. Run the following command in the Azure Cloud Shell terminal. Replace values with your actual server name and admin user login name. Use the empty database **postgres** with admin user in this format: `<admin-username>@<servername>`.
99-
100-
```azurecli-interactive
101-
psql --host=mydemoserver.postgres.database.azure.com --port=5432 --username=myadmin@mydemoserver --dbname=postgres
102-
```
103-
104-
Here's how the experience looks in the Cloud Shell terminal:
105-
106-
```bash
107-
Requesting a Cloud Shell.Succeeded.
108-
Connecting terminal...
109-
110-
Welcome to Azure Cloud Shell
111-
112-
Type "az" to use Azure CLI
113-
Type "help" to learn about Cloud Shell
114-
115-
user@Azure:~$psql --host=mydemoserver.postgres.database.azure.com --port=5432 --username=myadmin@mydemoserver --dbname=postgres
116-
Password for user [email protected]:
117-
psql (12.2 (Ubuntu 12.2-2.pgdg16.04+1), server 11.6)
118-
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
119-
Type "help" for help.
120-
121-
postgres=>
122-
```
123-
4. In the same Azure Cloud Shell terminal, create a database called **guest**.
124-
125-
```bash
126-
postgres=> CREATE DATABASE guest;
127-
```
128-
129-
5. Switch connections to the newly created **guest** database.
130-
131-
```bash
132-
\c guest
133-
```
134-
6. Type `\q`, and then select the Enter key to close psql.
135-
136-
[Having issues? Let us know.](https://aka.ms/postgres-doc-feedback)
137-
138-
## Clean up resources
139-
140-
You've successfully created an Azure Database for PostgreSQL server in a resource group. If you don't expect to need these resources in the future, you can delete them by deleting either the resource group or the PostgreSQL server.
141-
142-
To delete the resource group:
143-
144-
1. In the Azure portal, search for and select **Resource groups**.
145-
2. In the resource group list, choose the name of your resource group.
146-
3. On the **Overview** page of your resource group, select **Delete resource group**.
147-
4. In the confirmation dialog box, enter the name of your resource group, and then select **Delete**.
148-
149-
To delete the server, select the **Delete** button on the **Overview** page of your server:
150-
151-
> [!div class="mx-imgBorder"]
152-
> :::image type="content" source="media/quickstart-create-database-portal/12-delete.png" alt-text="Screenshot that shows the button for deleting a server.":::
153-
154-
[Having issues? Let us know.](https://aka.ms/postgres-doc-feedback)
155-
156-
## Next steps
157-
158-
> [!div class="nextstepaction"]
159-
> [Migrate your database using export and import](./how-to-migrate-using-export-and-import.md) <br/>
20+
> Please be aware that as part of the ongoing retirement process for Azure Database for PostgreSQL - Single Server, the option to create new instances via the Azure portal is no longer available.
21+
> While portal-based creation is discontinued, you can continue to create Single Server instances using methods such as [Azure CLI](quickstart-create-server-database-azure-cli.md), [Azure CLI up command](quickstart-create-server-up-azure-cli.md) or the [ARM template](quickstart-create-postgresql-server-database-using-arm-template.md). However, please note that as of March 2025, these methods will also no longer be used for creating new instances.
16022
161-
> [!div class="nextstepaction"]
162-
> [Design a database](./tutorial-design-database-using-azure-portal.md#create-tables-in-the-database)
23+
16324

164-
[Cannot find what you are looking for? Let us know.](https://aka.ms/postgres-doc-feedback)

0 commit comments

Comments
 (0)