Skip to content

Commit 5fa08aa

Browse files
Merge pull request #28786 from WilliamAntonRohm/issue-9411
sql-docs/issues/9411 -- reversed logic
2 parents ba6b21b + fe27646 commit 5fa08aa

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ As general guideline, better performance can be obtained via the [.NET Core vers
2222
1. Unzip archive as directed on the download page.
2323
1. Open a command prompt and change directory (`cd`) to the SqlPackage folder.
2424

25-
It is important to use the latest available version of SqlPackage as performance improvements and bug fixes are released regularly.
25+
It's important to use the latest available version of SqlPackage as performance improvements and bug fixes are released regularly.
2626

2727
### Substitute SqlPackage for the Import/Export Service
28-
If you have attempted to use the Import/Export Service to import or export your database, you may be interested in using SqlPackage to perform the same operation with more control on optional parameters and properties.
28+
If you have 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.
2929

3030
For Import, an example command is:
3131

@@ -39,7 +39,7 @@ For Export, an example command is:
3939
./SqlPackage /Action:Export /tf:<target-bacpac-file-path> /ssn:<full-source-server-name> /sdn:<source-database-name> /su:<source-server-username> /sp:<source-server-password> /df:<log-file>
4040
```
4141

42-
Alternative to username and password, [multi-factor authentication](/azure/azure-sql/database/authentication-mfa-ssms-overview) can be used to authenticate via Microsoft Entra authentication (formerly Azure Active Directory) with multi-factor authentication. Substitute the username and password parameters for `/ua:true` and `/tid:"yourdomain.onmicrosoft.com"`.
42+
Alternative to username and password, [multifactor authentication](/azure/azure-sql/database/authentication-mfa-ssms-overview) can be used to authenticate via Microsoft Entra authentication (formerly Azure Active Directory) with multifactor authentication. Substitute the username and password parameters for `/ua:true` and `/tid:"yourdomain.onmicrosoft.com"`.
4343

4444
## Common issues
4545

@@ -53,18 +53,18 @@ For issues related to timeouts, the following properties can be used to tune the
5353

5454
### Client resource consumption
5555

56-
For the export and extract commands, table data is passed to a temporary directory to buffer before being written to the bacpac/dacpac file. This storage requirement may be large and is relative to the full size of the data to be exported. Specify an alternative temporary directory with the property `/p:TempDirectoryForTableData=<path>`.
56+
For the export and extract commands, table data is passed to a temporary directory to buffer before being written to the bacpac/dacpac file. This storage requirement can be large and is relative to the full size of the data to be exported. Specify an alternative temporary directory with the property `/p:TempDirectoryForTableData=<path>`.
5757

58-
The schema model is compiled in memory, so for large database schemas the memory requirement on the client machine running SqlPackage may be significant.
58+
The schema model is compiled in memory, so for large database schemas the memory requirement on the client machine running SqlPackage can be significant.
5959

6060

6161
### Low server resource consumption
6262

63-
By default, SqlPackage sets the maximum server parallelism to 8. If you note low server resource consumption, increasing the value of the `MaxParallelism` parameter may improve performance.
63+
By default, SqlPackage sets the maximum server parallelism to 8. If you note low server resource consumption, increasing the value of the `MaxParallelism` parameter can improve performance.
6464

6565
### Access token
6666

67-
Using the `/AccessToken:` or `/at:` parameter enables token-based authentication for SqlPackage, however passing the token to the command can be tricky. If you are parsing an access token object in PowerShell either explicitly pass the string value or wrap the reference to the token property in $(). For example:
67+
Using the `/AccessToken:` or `/at:` parameter enables token-based authentication for SqlPackage, however passing the token to the command can be tricky. If you're parsing an access token object in PowerShell either explicitly pass the string value or wrap the reference to the token property in $(). For example:
6868

6969
```powershell
7070
$Account = Connect-AzAccount -ServicePrincipal -Tenant $Tenant -Credential $Credential
@@ -78,12 +78,12 @@ SqlPackage /at:$($AccessToken_Object.Token)
7878

7979
### Connection
8080

81-
If SqlPackage is failing to connect, the server may not have encryption enabled or the configured certificate may not be issued from a trusted certificate authority (such as a self-signed certificate). You can change the SqlPackage command to either connect without encryption or to trust the server certificate. The [best practice](../../relational-databases/security/securing-sql-server.md) is to ensure that a trusted encrypted connection to the server can be established.
81+
If SqlPackage is failing to connect, the server might not have encryption enabled or the configured certificate might not be issued from a trusted certificate authority (such as a self-signed certificate). You can change the SqlPackage command to either connect without encryption or to trust the server certificate. The [best practice](../../relational-databases/security/securing-sql-server.md) is to ensure that a trusted encrypted connection to the server can be established.
8282

8383
- Connect without encryption: /SourceEncryptConnection=False or /TargetEncryptConnection=False
8484
- Trust server certificate: /SourceTrustServerCertificate=True or /TargetTrustServerCertificate=True
8585

86-
You may see any of the following warning messages when connecting to a SQL instance, indicating that command line parameters may require changes to connect to the server:
86+
You could see any of the following warning messages when connecting to a SQL instance, indicating that command line parameters could require changes to connect to the server:
8787

8888
```output
8989
The settings for connection encryption or server certificate trust may lead to connection failure if the server is not properly configured.
@@ -105,23 +105,23 @@ ALTER TABLE [HumanResources].[Department]
105105
ADD CONSTRAINT [DF_Department_ModifiedDate_] DEFAULT ('') FOR [ModifiedDate];
106106
```
107107

108-
These are the causes and solutions to work around this error:
108+
Here are the causes and solutions to work around this error:
109109

110-
1. Verify that the destination you are importing into is an empty database.
111-
1. If your database has constraints that are using the DEFAULT attribute (where SQL Server assigns a random name to the constraint) as well as an explicitly named constraint, you may have an issue where a constraint with the same name is attempted to be created twice. It is recommended to use all explicitly named constraints (not using DEFAULT), or all system-defined names (using DEFAULT).
110+
1. Verify that the destination you're importing into is an empty database.
111+
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).
112112
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.
113113

114114
## Diagnostics
115115
Logs are essential to troubleshooting. Capture the diagnostic logs to a file with the `/DiagnosticsFile:<filename>` parameter.
116116

117-
Additional performance-related trace data can be logged by setting the environment variable `DACFX_PERF_TRACE=true` before running SqlPackage. To set this environment variable in PowerShell, use the following command:
117+
More performance-related trace data can be logged by setting the environment variable `DACFX_PERF_TRACE=true` before running SqlPackage. To set this environment variable in PowerShell, use the following command:
118118

119119
``` powershell
120120
Set-Item -Path Env:DACFX_PERF_TRACE -Value true
121121
```
122122

123123
## Import action tips
124-
For imports that contain large tables or tables with many indexes, the use of `/p:RebuildIndexesOfflineForDataPhase=True` or `/p:DisableIndexesForDataPhase=False` may improve performance. These properties modify the index rebuild operation to occur offline or not occur, respectively. Those and other properties are available to tune the [SqlPackage Import](sqlpackage-import.md) operation.
124+
For imports that contain large tables or tables with many indexes, the use of `/p:RebuildIndexesOfflineForDataPhase=True` or `/p:DisableIndexesForDataPhase=False` can improve performance. These properties modify the index rebuild operation to occur offline or not occur, respectively. Those and other properties are available to tune the [SqlPackage Import](sqlpackage-import.md) operation.
125125

126126
## Export action tips
127127
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.
@@ -130,21 +130,21 @@ In scenarios where the OS disk space is limited and runs out during the export,
130130

131131
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.
132132

133-
To obtain the database schema and data while skipping the schema validation, perform an [Export](sqlpackage-export.md) with the property `/p:VerifyExtraction=True`.
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`.
134134

135135
## Azure SQL Database
136136

137137
The following tips are specific to running import or export against Azure SQL Database from an Azure virtual machine (VM):
138138

139139
- Use Business Critical or Premium tier database for best performance.
140-
- Use SSD storage on the VM and ensure there is enough room to unzip the bacpac.
140+
- Use SSD storage on the VM and ensure there's enough room to unzip the bacpac.
141141
- Execute SqlPackage from a VM in the same region as the database.
142142
- Enable accelerated networking in the VM.
143143

144144
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).
145145

146146

147-
## Next steps
147+
## Related content
148148

149149
- [SqlPackage overview](sqlpackage.md)
150150
- Learn more about [SqlPackage Import](sqlpackage-import.md)

0 commit comments

Comments
 (0)