Visual Studio is adding random spaces in my connection string when doing a schema compare. Anyone know why?
ConnectionString-xml-element-diff.txt
:
old: MultipleActiveResultSets=False;Connect Timeout=10;TrustServerCertificate=False;
new: Multiple Active Result Sets=False;Connect Timeout=10;Trust Server Certificate=False;
Above is the short version, rant and details to follow (details I already understand, that you don't need to explain in your answer).
Details and History
- The only reason I have the
*.scmp
files is because Visual Studio doesn't have a decent set of defaults when doing SQL Server schema compare (running app environment database like MyAppDev or MyAppTest01) vs git's app schema. - VS tooling churns these files all the time, randomly. Why can't they use a
.yaml
file that doesn't contain all these .NET types that have nothing to do with the task I'm trying to accomplish.
Why (1)? It defaults to ALL objects in SQL Server. I get these tools could be used by DBAs, sure, but I think MOST folks using Visual Studio are devs! (I.e. NOT DBAs primarily!) So why does this by default try to compare and deploy disk partition schemes and AD service account permissions when I don't have access to any of that stuff? I have to turn off a TON of object types for every DB schema project I add with Visual Studio (or copy .scmp
file from a prior project).
git-diff.txt
:
diff --git a/data/mssql/sql-compare-schema/MyTeam_SampleApp to SampleApp.uat.scmp b/data/mssql/sql-compare-schema/MyTeam_SampleApp to SampleApp.uat.scmp
index ab013241c..1e0b8a7a0 100644
--- a/data/mssql/sql-compare-schema/MyTeam_SampleApp to SampleApp.uat.scmp
+++ b/data/mssql/sql-compare-schema/MyTeam_SampleApp to SampleApp.uat.scmp
@@ -9,7 +9,7 @@
</SourceModelProvider>
<TargetModelProvider>
<ConnectionBasedModelProvider>
- <ConnectionString>Data Source=SampleApp-uat.internal.mycorp.com;Initial Catalog=MyTeam_SampleAppOffice;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=10;Encrypt=False;TrustServerCertificate=False</ConnectionString>
+ <ConnectionString>Data Source=SampleApp-uat.internal.mycorp.com;Initial Catalog=MyTeam_SampleAppOffice;Integrated Security=True;Persist Security Info=False;Pooling=False;Multiple Active Result Sets=False;Connect Timeout=10;Encrypt=False;Trust Server Certificate=False</ConnectionString>
</ConnectionBasedModelProvider>
</TargetModelProvider>
<SchemaCompareSettingsService>
@@ -338,7 +342,7 @@
</PropertyElementName>
<PropertyElementName>
<Name>TargetConnectionString</Name>
- <Value>Data Source=SampleApp-uat.internal.mycorp.com;Initial Catalog=MyTeam_SampleAppOffice;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=10;Encrypt=False;TrustServerCertificate=False;Application Name="Microsoft SQL Server Data Tools, Schema Compare"</Value>
+ <Value>Data Source=SampleApp-uat.internal.mycorp.com;Initial Catalog=MyTeam_SampleAppOffice;Integrated Security=True;Persist Security Info=False;Pooling=False;Multiple Active Result Sets=False;Connect Timeout=10;Encrypt=False;Trust Server Certificate=False;Application Name="Microsoft SQL Server Data Tools, Schema Compare"</Value>
</PropertyElementName>
<PropertyElementName>
<Name>TreatVerificationErrorsAsWarnings</Name>
@@ -1156,560 +1160,604 @@
<Filter>Equals_Objects,Not_Supported_Deploy</Filter>
</SchemaCompareViewSettings>
<ExcludedSourceElements>
- <SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlProcedure, Microsoft.Data.Tools.Schema.Sql, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Name>dbo</Name>
<Name>sp_generate_merge</Name>
</SelectedItem>