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
+16-15Lines changed: 16 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,22 @@ The connection string provided contains encryption settings which may lead to co
88
88
89
89
More information about the connection security changes in SqlPackage is available in this [blog post](https://aka.ms/dacfx-connection).
90
90
91
+
92
+
### Import action error 2714 for constraint
93
+
94
+
When performing an import action you may receive error 2714 as below if an object already exists.
95
+
```
96
+
*** Error importing database:Could not import package.
97
+
Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 2714, Level 16, State 5, Line 1 There is already an object named 'DF_Department_ModifiedDate_0FF0B724'in the database.
98
+
Error SQL72045: Script execution error. The executed script:
99
+
ALTER TABLE [HumanResources].[Department]
100
+
ADD CONSTRAINT [DF_Department_ModifiedDate_] DEFAULT ('') FOR [ModifiedDate];
101
+
```
102
+
There are a couple causes and solutions to workaround this error:
103
+
1) Verify that the destination you are importing into is an empty database.
104
+
2) If your database has constraints that are using the DEFAULT attribute (so SQL will name 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 unexplicitly defined (using DEFAULT).
105
+
3) 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.
106
+
91
107
## Diagnostics
92
108
Logs are essential to troubleshooting. Capture the diagnostic logs to a file with the `/DiagnosticsFile:<filename>` parameter.
93
109
@@ -108,21 +124,6 @@ During an export process the table data is compressed in the bacpac file. The us
108
124
109
125
To obtain the database schema and data while skipping the schema validation, perform an [Export](sqlpackage-export.md) with the property `/p:VerifyExtraction=True`.
110
126
111
-
## Import action error 2714 for constraint
112
-
113
-
When performing an import action against, you may receive error 2714 as below if an object already exists.
114
-
```
115
-
*** Error importing database:Could not import package.
116
-
Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 2714, Level 16, State 5, Line 1 There is already an object named 'DF_Department_ModifiedDate_0FF0B724'in the database.
117
-
Error SQL72045: Script execution error. The executed script:
118
-
ALTER TABLE [HumanResources].[Department]
119
-
ADD CONSTRAINT [DF_Department_ModifiedDate_] DEFAULT ('') FOR [ModifiedDate];
120
-
```
121
-
There are a couple causes and solutions to workaround this error:
122
-
1) Verify that the destination you are importing into is an empty database.
123
-
2) If your database has constraints that are using the DEFAULT attribute (so SQL will name 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 unexplicitly defined (using DEFAULT).
124
-
3) Manually edit the model.xml and rename the constraint with the name experiencing the error to a unique name.
0 commit comments