You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article explains how to import or export an Azure SQL Database using [Private Link](private-endpoint-overview.md)by using the Azure portal or Azure PowerShell with*Allow Access to Azure Services* set to **Off** on the Azure SQL [logical server](logical-servers.md).
22
+
This article explains how to import or export an Azure SQL Database by using [Private Link](private-endpoint-overview.md)with the Azure portal or Azure PowerShell. Set*Allow Access to Azure Services* to **Off** on the Azure SQL [logical server](logical-servers.md).
22
23
23
-
Running Import or Export requires you to set [Allow Access to Azure Services](network-access-controls-overview.md) to **On**, otherwise the Import or Export operation fails with an error.
24
+
By using Private Link, you can perform import and export operations securely without needing to set [Allow Access to Azure Services](network-access-controls-overview.md) to **On**, which is otherwise required for standard import and export operations.
24
25
25
26
> [!NOTE]
26
-
> Import/export using private link for Azure SQL Database is currently in preview.
27
+
> Import and export by using private link for Azure SQL Database is currently in preview.
28
+
29
+
## Prerequisites
30
+
31
+
Before using import and export with Private Link, ensure you have the following resources and configurations:
32
+
33
+
- An Azure SQL logical server with private endpoint connectivity configured to a virtual network
34
+
- An Azure Storage account with a blob container that contains your BACPAC file (for import) or stores the exported BACPAC file
35
+
- The Azure SQL logical server and Storage account must have private endpoints configured within the same or peered virtual networks
36
+
- Appropriate permissions to approve private endpoint connections on both the Azure SQL logical server and the Storage account
27
37
28
38
## What is import/export private link?
29
39
30
-
The database import/export private link is a service managed private endpoint created by Microsoft. When enabled, a private link is exclusively used for all communications by the database import/export process, the Azure SQL database, and related Azure Storage services. A service managed private endpoint is a private IP address within a specific virtual network and subnet.
40
+
The database import/export private link is a service managed private endpoint created by Microsoft. When you enable the **Use private link** option during import or export, the service automatically creates private endpoints to facilitate secure communication between the database import/export process, your Azure SQL database, and the Azure Storage service.
41
+
42
+
These service-managed private endpoints are created within the same virtual network and subnet where your existing Azure SQL logical server private endpoint is located. The endpoints receive private IP addresses from that subnet's address space and must be manually approved before the import/export operation can proceed.
31
43
32
-
The private endpoint must be manually approved for both the Azure SQL logical server and the Azure Blob storage account, in separate steps, with details included in this tutorial.
44
+
> [!IMPORTANT]
45
+
> If your Azure SQL logical server or Storage account already has private endpoints configured, the import/export service creates **additional** service-managed private endpoints specifically for the import/export operation. These private endpoints are separate from your existing private endpoints and require separate approval.
46
+
47
+
You must manually approve the private endpoint for both the Azure SQL logical server and the Azure Blob storage account in separate steps. This tutorial includes the details.
33
48
34
49
:::image type="content" source="media/database-import-export-private-link/import-export-private-link.png" alt-text="Diagram of Import Export Private link architecture." lightbox="media/database-import-export-private-link/import-export-private-link.png":::
35
50
36
51
## Configure Import-Export Private Link using the Azure portal
37
52
38
-
Import/Export Private Link can be configured via Azure portal, PowerShell, or using REST API.
53
+
You can configure Import/Export Private Link through the Azure portal, PowerShell, or REST API.
54
+
55
+
> [!NOTE]
56
+
> The service automatically creates private endpoints in the same virtual network and subnet as your Azure SQL logical server's existing private endpoint. You don't need to manually specify the virtual network or subnet during the import/export process. If your SQL server doesn't have a private endpoint configured, you must set one up before using import/export with Private Link.
39
57
40
58
### 1. Configure Import/Export private link using the Azure portal
41
59
42
60
<aid="create-import-private-link"></a>
43
61
44
62
#### Enable Import private link
45
63
46
-
You need to enable and approve the import private link. Creating the private link is performed automatically in Azure.
64
+
You need to enable and approve the import private link. Azure automatically creates the private link.
47
65
48
-
1. Go to the **Overview** page of the Azure SQL logical server into which you would like to import the database. Select **Import database** from toolbar.
66
+
1. Go to the **Overview** page of the Azure SQL logical server where you want to import the database. Select **Import database** from the toolbar.
49
67
50
68
1. In the **Import database** page, select the **Use private link** option checkbox.
51
69
52
70
1. Enter the storage account, authentication credentials, database details, and select **OK**.
53
71
54
72
<aid="create-export-private-link"></a>
55
73
56
-
#### Enable Export private link
74
+
#### Enable export private link
57
75
58
-
You need to enable and approve the export private link. Creating the private link is performed automatically in Azure.
76
+
You need to enable and approve the export private link. Azure automatically creates the private link.
59
77
60
-
1. Go to the **Overview** page of the Azure SQL database that you would like to export. Select **Export** from the toolbar.
78
+
1. Go to the **Overview** page of the Azure SQL database that you want to export. Select **Export** from the toolbar.
61
79
1. In the **Export database** page, select the **Use private link** option checkbox.
62
80
1. Enter the storage account, authentication credentials, database details, and select **OK**.
63
81
64
82
### 2. Approve private link for Azure SQL logical server
65
83
66
-
The new private endpoint must be approved by the user in the Private Link Center or in the Azure SQL Database, or you can approve both private links individually in their respective Azure portal locations.
84
+
The user must approve the new private endpoint in the Private Link Center or in the Azure SQL Database. You can approve both private links individually in their respective Azure portal locations.
85
+
86
+
> [!TIP]
87
+
> If you already have private endpoints configured for your Azure SQL logical server and Storage account, you see the new service-managed private endpoints appear as **pending connections**. These private endpoints are specifically for the import/export operation and are separate from your existing private endpoints. Look for private endpoints with names indicating they were created by the import/export service.
67
88
68
89
#### Option 1: Approve private endpoints in Private Link Center in Azure portal
69
90
70
-
1. Navigate to the Private Link Center in the Azure portal. In the Azure search box, search for "Private Link". Select **Private Link**.
91
+
1. Navigate to the Private Link Center in the Azure portal. In the Azure search box, search for *Private Link*. Select **Private Link**.
71
92
72
93
1. In the Private Link Center, select **Pending connections**.
73
94
74
-
1. Select both private endpoints you created using the Import/Export service. Select **Approve**.
95
+
1. Select both private endpoints you created by using the Import/Export service. Select **Approve**.
75
96
76
97
:::image type="content" source="media/database-import-export-private-link/approve-private-link-center.png" alt-text="Screenshot from the Private Link Center of the Azure portal showing how to approve both private links." lightbox="media/database-import-export-private-link/approve-private-link-center.png":::
77
98
@@ -83,7 +104,7 @@ The new private endpoint must be approved by the user in the Private Link Center
83
104
84
105
1. Select the **Private access** tab.
85
106
86
-
1. In the list under **Private endpoint connections**, select the private endpoints you created using the Import/Export service.
107
+
1. In the list under **Private endpoint connections**, select the private endpoints you created by using the Import/Export service.
87
108
88
109
1. Select **Approve**.
89
110
@@ -103,19 +124,21 @@ The new private endpoint must be approved by the user in the Private Link Center
103
124
104
125
### 3. Check import/export status
105
126
106
-
1. After the private endpoints are approved, both in the Azure SQL server and the Azure Storage account, the database import or export job will be kicked off. Until then, the jobs are on hold.
127
+
1. After you approve the private endpoints in both the Azure SQL server and the Azure Storage account, the database import or export job begins. Until then, the jobs are on hold.
107
128
108
129
1. You can check the status of database import or export jobs in **Import/Export History** page under **Data Management** section in Azure SQL server page.
109
130
110
131
:::image type="content" source="media/database-import-export-private-link/import-export-status.png" alt-text="Screenshot from the Azure portal that shows how to check Import Export Jobs Status." lightbox="media/database-import-export-private-link/import-export-status.png":::
111
132
112
133
## Configure import/export private link using PowerShell
113
134
135
+
When you use PowerShell, the service-managed private endpoints are automatically created in the same virtual network and subnet as your Azure SQL logical server's existing private endpoint. Ensure your SQL server has private endpoint connectivity configured before running these commands.
136
+
114
137
### Import a database using private link in PowerShell
115
138
116
139
Use the [New-AzSqlDatabaseImport](/PowerShell/module/az.sql/new-azsqldatabaseimport) cmdlet to submit an import database request to Azure. Depending on database size, the import might take some time to complete. The DTU-based provisioning model supports select database max size values for each tier. When importing a database, [use the supported edition and service objective values for Azure SQL Database](/sql/t-sql/statements/create-database-transact-sql?view=azuresqldb-current&preserve-view=true#create-a-database).
117
140
118
-
Provide your own `<values>` in the following PowerShell code sample, which imports a .bacpac file named `sample.bacpac` and creates an Azure SQL Database with 2 General Purpose vCores.
141
+
Provide your own `<values>` in the following PowerShell code sample, which imports a .bacpac file named `sample.bacpac` and creates an Azure SQL Database with two General Purpose vCores.
119
142
120
143
```powershell
121
144
$importRequestParams = @{
@@ -170,15 +193,15 @@ Existing APIs to perform Import and Export jobs support Private Link. Refer to [
170
193
171
194
Currently, the private link for import/export has the following limitations:
172
195
173
-
- To use Private Link with Import/Export, the user database and the Azure Storage blob container must be hosted on the same type of Azure Cloud. For example, either both in Azure Commercial or both on Azure Gov. Hosting across cloud types isn't supported.
196
+
- To use Private Link with Import/Export, the user database and the Azure Storage blob container must be on the same type of Azure Cloud. For example, both must be in Azure Commercial or both in Azure Gov. Hosting across cloud types isn't supported.
174
197
175
-
- Import or Export of a database from [Azure SQL Managed Instance](../managed-instance/sql-managed-instance-paas-overview.md) using PowerShell isn't currently supported.
198
+
- Import or Export of a database from [Azure SQL Managed Instance](../managed-instance/sql-managed-instance-paas-overview.md)by using PowerShell isn't currently supported.
176
199
177
-
- Import/Export Private Link shouldn't be used when the user Database or the Azure Storage account are protected by Resource locks.
200
+
-Don't use Import/Export Private Link when the user Database or the Azure Storage account are protected by Resource locks.
178
201
179
-
-Manual approval of the new private endpoint connection is required to complete the export operation. After starting the export, go to "pending connections" in the Private Link Center and approve the connections, which can take several minutes to appear.
202
+
-You need to manually approve the new private endpoint connection to complete the export operation. After starting the export, go to **pending connections** in the Private Link Center and approve the connections, which can take several minutes to appear.
180
203
181
-
- Import using Private Link doesn't support specifying a backup storage redundancy while creating a new database and creates with the default geo-redundant backup storage redundancy. As a workaround, first create an empty database with desired backup storage redundancy using Azure portal or PowerShell and then import the BACPAC file into this empty database.
204
+
- Import using Private Link doesn't support specifying a backup storage redundancy while creating a new database and creates with the default geo-redundant backup storage redundancy. As a workaround, first create an empty database with desired backup storage redundancy by using Azure portal or PowerShell, then import the BACPAC file into this empty database.
182
205
183
206
- Import using REST API with private link can only be completed for an existing database since the API uses database extensions. As a workaround, create an empty database with the desired name, then call the Import REST API with private link.
0 commit comments