sp_refreshview

  • 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 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".

  • Or it only refreshes schema-bound view, but do not refresh non-schema bound view?

  • 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:

    Understanding SQL Compare - 9.0

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply