0

I'm trying to use SSDT to update schema on a target database based on a source database.

sqlpackage.exe /a:Script /sf:source.dacpac /tf:target.dacpac /tdn:"MyTargetDB" /op:update.sql /p:ExcludeObjectTypes="Users;RoleMembership"

I'm using the ExcludeObjectTypes property to prevent the script to create users on target. But my update.sql still contains this section:

GO
PRINT N'Creating [username]...';

GO
CREATE SCHEMA [username]
    AUTHORIZATION [username];

Is it possible to exclude this as well?

4

0 回答 0