Reputation: 1224
I'm attempting to use the SQL Server Database Deploy release task to deploy my dacpac and I would like to use the /p:DoNotDropObjectTypes=Users;Permissions argument to prevent certain objects from being dropped, however I'm getting the following error below:
2018-08-13T15:48:30.2644849Z ##[section]Starting: Deploy using : dacpac
2018-08-13T15:48:30.2655188Z ==============================================================================
2018-08-13T15:48:30.2655399Z Task : SQL Server Database Deploy
2018-08-13T15:48:30.2655603Z Description : Deploy to SQL Server Database using DACPAC or SQL scripts
2018-08-13T15:48:30.2655749Z Version : 0.3.11
2018-08-13T15:48:30.2655878Z Author : Microsoft Corporation
2018-08-13T15:48:30.2656030Z Help : [More Information](https://aka.ms/sqldacpacmachinegroupreadme)
2018-08-13T15:48:30.2656531Z ==============================================================================
2018-08-13T15:48:36.9603826Z *** 'DoNotDropObjectTypes' is not a valid argument for the 'Publish' action.
2018-08-13T15:48:37.2122455Z ##[error]System.Management.Automation.RuntimeException
2018-08-13T15:48:37.2249276Z ##[section]Finishing: Deploy using : dacpac
I also tried this with my publish profile sans setting the additional arguments in the task:
<DropObjectsNotInSource>True</DropObjectsNotInSource>
<DoNotDropPermissions>True</DoNotDropPermissions>
<DoNotDropRoleMembership>True</DoNotDropRoleMembership>
<DoNotDropUsers>True</DoNotDropUsers>
but SqlPackage tried to drop them anyway:
Dropping Permission... Dropping Permission... Dropping Permission... Dropping Permission... Dropping Permission... Dropping Permission... Dropping Permission...
Upvotes: 1
Views: 1087
Reputation: 407
I think SQL Server Data Tools need to be installed where your agent is running. Check this MSDN article and this blog post .
Upvotes: 0