How can we help you today? How can we help you today?

Database Package Creation Fails on Validation

##[warning]The error 'Cannot find the user 'ODSViewer', because it does not exist or you do not have permission.' occurred when executing the following SQL:
2018-01-16T23:50:57.4416088Z GRANT SELECT ON [dbo].[ActiveDirectoryImport] TO [ODSViewer]
2018-01-16T23:50:57.7087918Z ##[error]RedGate.DLMAutomation.Shared.Errors.TerminatingException: Schema validation failed: Cannot find the user 'ODSViewer', because it does not exist or you do not have permission. ---> System.Data.SqlClient.SqlException: Cannot find the user 'ODSViewer', because it does not exist or you do not have permission.
2018-01-16T23:50:57.7087918Z

ODSViewer is a Role - I have the following script: (Security/Roles)

CREATE ROLE [ODSViewer]
AUTHORIZATION [dbo]
GO

Note that I have to ignore Users as they are different per environment
DanSniderman
0

Comments

1 comment

  • Sergio R
    This error was happening because the role was being excluded from a filter, however there was an object permission that referenced it.

    The issue can be resolved by using the SQL Compare Option "IgnorePermissions"
    Sergio R
    0

Add comment

Please sign in to leave a comment.