Error during Invoke-DlmDatabaseSchemaValidation EXEC sp_refreshview Could not find object '[dbo].[vw
saulcruz
Posts: 19 Bronze 1
Hey forum,
During schema validation I'm getting the following:
During schema validation I'm getting the following:
WARNING: The error 'Could not find object '[dbo].[vw_viewName]' or you do not have permission.' occurred when executing the following SQL:
EXEC sp_refreshview N'[dbo].[vw_viewName]'
I've already checked my scripts folder and the view is there, any ideas on what this could be?
Also, is the sp_refreshview part of the Invoke-DlmDatabaseSchemaValidation?
Thanks
I've already checked my scripts folder and the view is there, any ideas on what this could be?
Also, is the sp_refreshview part of the Invoke-DlmDatabaseSchemaValidation?
Thanks
Tagged:
Answers
We do not have an ETA on the fix for this yet, but in the meantime, you should be able to workaround this by editing the EXEC sp_refreshview out of the migration script using the edit function on the migration scripts tab in SQL Source Control.
We'll post here once we have any updates on this.
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
A possible workaround could be to add some code to the script that forces it to consider the view as a dependency to the script and as a result create it before the script runs, for example:
SELECT 1 FROM [dbo].[vw_ViewName]
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?