Try:
sqlpackage /Action:Publish /p:ExcludeObjectTypes="Users;Permissions"
You are running sqlpackage via PowerShell which uses ; as a command seperator.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi everyone,
I am deploying a database project using the generated DACPAC and SQLPackage.
I am facing an unexpected behaviour when excluding object types while publishing.
If I enter the excluded objects using the "plural" property ExcludeObjectTypes, the deployment is failing.
Example (not working):
sqlpackage /Action:Publish /p:ExcludeObjectTypes=Users;Permissions
Error message: Permissions: command not found
However, if I specify the objects individually with the "singular" property, then it works
sqlpackage /Action:Publish /p:ExcludeObjectType=Users /p:ExcludeObjectType=Permissions
I would like to know if I am doing something wrong or there is a bug in the tool.
Target database is a Synapse Analytics SQL Pool Database and SQLPackage version is the latest.
Kind regards,
Paul
Try:
sqlpackage /Action:Publish /p:ExcludeObjectTypes="Users;Permissions"
You are running sqlpackage via PowerShell which uses ; as a command seperator.
From the article "SqlPackage Publish parameters, properties, and SQLCMD variables", you can see the difference between ExcludeObjectType and ExcludeObjectTypes. When you try to exclude an object, you should use ExcludeObjectType=Object_Type. If you want to exclude multiple object types, you need to use ExcludeObjectTypes=List_of_Objects_Delimited_by_Semicolon.
Hi @Paul Hernandez ,
It seems that this will work find if you use a comma instead of a semicolon-delimited, please try it. Also, you could get more information from this link, see below:
Best regards,
Carrin
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.