April 26, 2012 at 4:07 pm
I am using red gate SQL compare tool.
I did a comparison that generats delta schema script.
I see there are some statements like :
EXEC sp_refreshview [Tests].[BusinessReport]
My question is when to use this sp_refreshview? I know the view needs to be refreshed if a column is added to the underlying table, or the view is using select * from...
But I know this view is depended on a table we added a column, but the view use explicit select columns , and the columns doesn't include the newly added column, why we still need to refresh the view?
Thanks
April 26, 2012 at 5:01 pm
You might want to check with support@red-gate.com, but I suspect it's just being overly paranoid and refreshing the view "just in case".
April 26, 2012 at 5:24 pm
Or it only refreshes schema-bound view, but do not refresh non-schema bound view?
April 26, 2012 at 10:51 pm
sqlfriends (4/26/2012)
I am using red gate SQL compare tool.I did a comparison that generats delta schema script.
I see there are some statements like :
EXEC sp_refreshview [Tests].[BusinessReport]
My question is when to use this sp_refreshview? I know the view needs to be refreshed if a column is added to the underlying table, or the view is using select * from...
But I know this view is depended on a table we added a column, but the view use explicit select columns , and the columns doesn't include the newly added column, why we still need to refresh the view?
Thanks
You should go through the following link:
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply