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
Copy file name to clipboardExpand all lines: docs/tools/sqlpackage/troubleshooting-issues-and-performance-with-sqlpackage.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ It's important to use the latest available version of SqlPackage as performance
30
30
31
31
### Substitute SqlPackage for the Import/Export Service
32
32
33
-
If you attempted to use the Import/Export Service to import or export your database, you can use SqlPackage to perform the same operation with more control on optional parameters and properties.
33
+
If you attempted to use the Import/Export Service to import or export your database, you can use SqlPackage to perform the same operation with more control on optional parameters and properties. The blog post [Optimizing BACPAC Imports - SqlPackage Done Right!](https://techcommunity.microsoft.com/blog/azuredbsupport/azure-sql-optimizing-bacpac-imports---sqlpackage-done-right/4472021) walks through the steps to use SqlPackage instead of the Import/Export Service for a `.bacpac` import.
34
34
35
35
For Import, an example command is:
36
36
@@ -153,14 +153,18 @@ For imports that contain large tables or tables with many indexes, the use of `/
153
153
154
154
For an export to be transactionally consistent, you must ensure either that no write activity is occurring during the export, or that you're exporting from a [transactionally consistent copy](/azure/azure-sql/database/database-copy) of your database. Receiving errors about foreign key constraints during an import can indicate that the export was not transactionally consistent due to inserted or updated records during the export process.
155
155
156
-
A common cause of performance degradation during export is unresolved object references, which causes SqlPackage to attempt to resolve the object multiple times. For example, a view is defined that references a table and the table no longer exists in the database. If unresolved references appear in the export log, consider correcting the schema of the database to improve the export performance.
156
+
### Performance during export
157
157
158
-
In scenarios where the OS disk space is limited and runs out during the export, the use of `/p:TempDirectoryForTableData` allows the data for export to be buffered on an alternative disk. The space required for this action might be large and is relative to the full size of the database. That and other properties are available to tune the [SqlPackage Export](sqlpackage-export.md) operation.
158
+
A common cause of performance degradation during export is unresolved object references, which causes SqlPackage to attempt to resolve the object multiple times. For example, a view is defined that references a table and the table no longer exists in the database. If unresolved references appear in the export log, consider correcting the schema of the database to improve the export performance.
159
159
160
160
During an export process, the table data is compressed in the bacpac file. The use of `/p:CompressionOption` set to `Fast`, `SuperFast`, or `NotCompressed` might improve the export process speed while compressing the output bacpac file less.
161
161
162
162
To obtain the database schema and data while skipping the schema validation, perform an [Export](sqlpackage-export.md) with the property `/p:VerifyExtraction=False`. An invalid export might be produced that can't be imported.
163
163
164
+
### Disk space during export
165
+
166
+
In scenarios where the OS disk space is limited and runs out during the export, the use of `/p:TempDirectoryForTableData` allows the data for export to be buffered on an alternative disk. The space required for this action might be large and is relative to the full size of the database. That and other properties are available to tune the [SqlPackage Export](sqlpackage-export.md) operation.
167
+
164
168
## Azure SQL Database
165
169
166
170
The following tips are specific to running import or export against Azure SQL Database from an Azure virtual machine (VM):
@@ -179,6 +183,10 @@ The [Azure Database Support Blog](https://techcommunity.microsoft.com/t5/azure-d
-[Lessons Learned #535: BACPAC Import Failures in Azure SQL Database due to Incompatible Users](https://techcommunity.microsoft.com/blog/azuredbsupport/lessons-learned-535-bacpac-import-failures-in-azure-sql-database-due-to-incompat/4455456)
188
+
-[Lesson Learned #523: Measuring Import Time -Parsing SqlPackage Logs with PowerShell](https://techcommunity.microsoft.com/blog/azuredbsupport/lesson-learned-523-measuring-import-time--parsing-sqlpackage-logs-with-powershel/4422436)
189
+
-[How to skip external data source references while doing export/Restore of an Azure SQL DB](https://techcommunity.microsoft.com/blog/azuredbsupport/how-to-skip-external-data-source-references-while-doing-exportrestore-of-an-azur/4377910)
182
190
-[Migrating an Azure SQL DB to a SQL MI by utilizing SqlPackage/ADF](https://techcommunity.microsoft.com/t5/azure-database-support-blog/migrating-an-azure-sql-db-to-a-sql-mi-by-utilizing-sqlpackage/ba-p/4061633)
183
191
-[Lesson Learned #446: Simplifying SQLPackage Log Debugging with PowerShell](https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-446-simplifying-sqlpackage-log-debugging-with/ba-p/3960502)
184
192
-[How to use Sqlpackage with Managed Identity](https://techcommunity.microsoft.com/t5/azure-database-support-blog/how-to-use-sqlpackage-with-managed-identity/ba-p/3642942)
0 commit comments