Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    9

    Unanswered: View not updating with table schema changes

    I notice that when I change my table schema, the view that was created based on the older schema remains using the older schema, and when I try running it, it will give me error.

    I assume that's because the view is still using the old execution plan? Is there a way to force an automatic recompilation of execution plans for all views when there is a change to the underlying table?

    Thanks!

  2. #2
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    sp_recompile
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  3. #3
    Join Date
    Feb 2002
    Posts
    2,232
    sp_refreshview
    If you do not have SQL Server Books Online (BOL) installed - please do so. The majority of questions asked in the SQL Server forum could be eliminated if people had access to bol. BOL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •