我们有一个带有发布配置文件的 Visual Studio 数据库项目,根据我是使用 Visual Studio 的Generate Script选项还是命令行中的 SQL Package 来生成不同的更改脚本:
- Visual Studio 创建一个 10,455KB 的文件。
- SqlPackage 使用以下命令创建一个 8,835KB 的文件:
SqlPackage /a:Script /sf:pub.dacpac /pr:pub.profile.xml
关于如何观察命令行 VS 用于生成其脚本的任何建议?任何想法当两个进程都使用以下发布配置文件时可能会有什么区别?
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IncludeCompositeObjects>True</IncludeCompositeObjects>
<TargetDatabaseName>nrc_gateway</TargetDatabaseName>
<DeployScriptFileName>clm_model.publish.sql</DeployScriptFileName>
<BlockOnPossibleDataLoss>False</BlockOnPossibleDataLoss>
<ScriptDatabaseCompatibility>True</ScriptDatabaseCompatibility>
<ProfileVersionNumber>1</ProfileVersionNumber>
<DropDmlTriggersNotInSource>False</DropDmlTriggersNotInSource>
<DropIndexesNotInSource>False</DropIndexesNotInSource>
<TargetConnectionString>Data Source=.;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=True</TargetConnectionString>
<AllowIncompatiblePlatform>True</AllowIncompatiblePlatform>
<DropConstraintsNotInSource>False</DropConstraintsNotInSource>
<DropExtendedPropertiesNotInSource>False</DropExtendedPropertiesNotInSource>
<VerifyDeployment>False</VerifyDeployment>
<BlockWhenDriftDetected>False</BlockWhenDriftDetected>
<RegisterDataTierApplication>False</RegisterDataTierApplication>
<IncludeTransactionalScripts>True</IncludeTransactionalScripts>
<ExcludeUsers>True</ExcludeUsers>
<ExcludeDatabaseRoles>False</ExcludeDatabaseRoles>
<DropObjectsNotInSource>False</DropObjectsNotInSource>
<DoNotDropAggregates>False</DoNotDropAggregates>
<DoNotDropApplicationRoles>False</DoNotDropApplicationRoles>
<DoNotDropAssemblies>False</DoNotDropAssemblies>
<DoNotDropAsymmetricKeys>False</DoNotDropAsymmetricKeys>
<DropPermissionsNotInSource>False</DropPermissionsNotInSource>
<GenerateSmartDefaults>True</GenerateSmartDefaults>
<ScriptNewConstraintValidation>True</ScriptNewConstraintValidation>
</PropertyGroup>
</Project>