Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 79a9367

Browse files
committed
more info
1 parent 9fe1ea9 commit 79a9367

1 file changed

Lines changed: 29 additions & 4 deletions

File tree

docs/tools/sqlpackage/troubleshooting-issues-and-performance-with-sqlpackage.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to troubleshoot with SqlPackage.
44
author: "dzsquared"
55
ms.author: "drskwier"
66
ms.reviewer: "maghan"
7-
ms.date: 08/25/2023
7+
ms.date: 05/31/2024
88
ms.service: sql
99
ms.subservice: tools-other
1010
ms.topic: conceptual
@@ -16,9 +16,11 @@ In some scenarios, SqlPackage operations take longer than expected or fail to co
1616

1717
## Overall strategy
1818

19-
As general guideline, better performance can be obtained via the [.NET Core version](sqlpackage-download.md#windows-net-8) of SqlPackage.
19+
As general guideline, better performance can be obtained via the [.NET version](sqlpackage-download.md#installation-cross-platform) of SqlPackage instead of the .NET Framework version installed via the DacFramework.msi.
2020

21-
1. [Download](sqlpackage-download.md#windows-net-8) the zip for SqlPackage on .NET Core for your operating system (Windows, macOS, or Linux).
21+
If you're unable to install the SqlPackage [dotnet tool](sqlpackage-download.md#installation-cross-platform), which enables executing SqlPackage commands from the command prompt in any directory:
22+
23+
1. [Download](sqlpackage-download.md#installation-file-download-alternative) the zip for SqlPackage on .NET 8 for your operating system (Windows, macOS, or Linux).
2224
1. Unzip archive as directed on the download page.
2325
1. Open a command prompt and change directory (`cd`) to the SqlPackage folder.
2426

@@ -111,6 +113,10 @@ Here are the causes and solutions to work around this error:
111113
1. If your database has constraints that are using the DEFAULT attribute (where SQL Server assigns a random name to the constraint) and an explicitly named constraint, a constraint with the same name might be created twice. You should use all explicitly named constraints (not using DEFAULT), or all system-defined names (using DEFAULT).
112114
1. Manually edit the model.xml and rename the constraint with the name experiencing the error to a unique name. This option should be undertaken only if directed by Microsoft support and poses a risk of .bacpac corruption.
113115

116+
### Stack overflow exception
117+
118+
Intermittent or persistent stack overflow exceptions are often caused by large T-SQL scripts with many nested statements. A parameter for SqlPackage is available on all commands, `/ThreadMaxStackSize:`, which specifies the maximum stack size for the thread running the SqlPackage process. The default value is determined by the .NET version running SqlPackage. Setting a large value can impact overall performance of SqlPackage, however increasing this value may resolve the stack overflow exception caused by nested statements. Refactoring the T-SQL code is recommended to avoid stack overflow exceptions whenever possible, but the `/ThreadMaxStackSize:` parameter can be used as a workaround. When using the `/ThreadMaxStackSize:` parameter, it is recommended to tune repeated operations to the lowest value that resolves the stack overflow exception if performance impact is noted. Be aware that the value is in megabytes (MB), example values for testing as a workaround include 10 and 100.
119+
114120
## Diagnostics
115121
Logs are essential to troubleshooting. Capture the diagnostic logs to a file with the `/DiagnosticsFile:<filename>` parameter.
116122

@@ -130,7 +136,7 @@ In scenarios where the OS disk space is limited and runs out during the export,
130136

131137
During an export process, the table data is compressed in the bacpac file. The use of `/p:CompressionOption` set to `Fast`, `SuperFast`, or `NotCompressed` may improve the export process speed while compressing the output bacpac file less.
132138

133-
To obtain the database schema and data while skipping the schema validation, perform an [Export](sqlpackage-export.md) with the property `/p:VerifyExtraction=False`.
139+
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 may be produced that cannot be imported.
134140

135141
## Azure SQL Database
136142

@@ -143,6 +149,25 @@ The following tips are specific to running import or export against Azure SQL Da
143149

144150
For more information on utilizing a PowerShell script to collect more information about an import operation, see [Lesson Learned #211: Monitoring SQLPackage Import Process](https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-211-monitoring-sqlpackage-import-process/ba-p/3556382).
145151

152+
## Additional resources
153+
154+
The [Azure Database Support Blog](https://techcommunity.microsoft.com/t5/azure-database-support-blog/bg-p/AzureDBSupport) contains many articles on troubleshooting and performance tuning for Azure SQL Database, including several articles on SqlPackage.
155+
156+
Some of the most relevant articles include:
157+
158+
- [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)
159+
- [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)
160+
- [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)
161+
- [Lesson Learned #298: Huge duration of database export using sqlpackage](https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-298-huge-duration-of-database-export-using/ba-p/3721709)
162+
- [Lesson Learned #281: Export fails due to system out of memory exception](https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-281-export-fails-due-to-system-out-of-memory/ba-p/3715249)
163+
- [Lesson Learned #281: Troubleshooting CHECK constraint issue importing a bacpac due to business logic](https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-281-troubleshooting-check-constraint-issue/ba-p/3715730)
164+
- [Lesson Learned #272: Execution Timeout Expired error message importing a Bacpac file](https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-272-execution-timeout-expired-error-message/ba-p/3712268)
165+
- [Lesson Learned #213: Cannot set the AccessToken property if the Integrated Security has been set](https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-213-cannot-set-the-accesstoken-property-if-the/ba-p/3563343)
166+
- [Lesson Learned #211: Monitoring SQLPackage Import Process](https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-211-monitoring-sqlpackage-import-process/ba-p/3556382)
167+
- [Lesson Learned #51: Managed Instance - Import via Sqlpackage.exe doesn't allow autogrow](https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-51-managed-instance-import-via-sqlpackage-exe/ba-p/369147)
168+
- [Lesson Learned #32: How to export multiple databases from SQL Server to Bacpac](https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-32-how-to-export-multiple-databases-from-sql/ba-p/369017)
169+
- [Step By Step: How to use SQLPackage with Access Token](https://techcommunity.microsoft.com/t5/azure-database-support-blog/step-by-step-how-to-use-sqlpackage-with-access-token/ba-p/1407819)
170+
- [Collation conflict when moving Azure SQL DB to SQL server on-premises or Azure VM using SQLPackage.](https://techcommunity.microsoft.com/t5/azure-database-support-blog/collation-conflict-when-moving-azure-sql-db-to-sql-server-on/ba-p/1547319)
146171

147172
## Related content
148173

0 commit comments

Comments
 (0)