我想使用DACPAC部署所有SQL Server脚本。我导入了数据库,我想在SQL Server中进行更改并提交SQL Server项目并创建dacpac并在VSTS中执行dacpac。我希望将scrips移动到多个环境,每个环境都有自己的登录/用户。因此,当我删除安全文件夹下的所有登录时,我不想考虑用户/登录。从项目中删除登录后,它会抛出大量未解析的引用。删除它的最佳方法是什么?
答案 0 :(得分:0)
考虑通过在publish.xml中提供用于部署dacpac的连接字符串来部署dacpac
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IncludeCompositeObjects>True</IncludeCompositeObjects>
<TargetDatabaseName>dbname</TargetDatabaseName>
<DeployScriptFileName>dbname.sql</DeployScriptFileName>
<TargetConnectionString>Data Source=<name>;user:<ussrname>;password:<password></TargetConnectionString>
<BlockOnPossibleDataLoss>False</BlockOnPossibleDataLoss>
<DropObjectsNotInSource>False</DropObjectsNotInSource>
<ProfileVersionNumber>1</ProfileVersionNumber>
</PropertyGroup>
<ItemGroup>
</ItemGroup>
</Project>