Database Package Creation Fails on Validation
DanSniderman
Posts: 2 New member
##[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
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
Tagged:
Answers
The issue can be resolved by using the SQL Compare Option "IgnorePermissions"
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools