1

I need to ALTER a VIEW in order to add an additional field but I am unable to alter/drop it because other objects (several functions and views) depend on it. Is there any way to alter the view without having to drop and create the existing functions and views that depend on it? Do you have any suggestion?

Thanks.

4
  • 4
    Unless there is schema-binding involved you should be able to do an ALTER VIEW just fine. Update the question to include the error message(s) you are receiving when you try. Jul 10, 2020 at 13:44
  • I resolved this issue removing the SCHEMABINDING on the depending objects. Thanks David.
    – user110366
    Jul 17, 2020 at 8:48
  • Be sure to reset it once you are done, as presumably schema binding was enabled for a reason. This could be specifically to stop unplanned changes (as an attempt to keep procedure interfaces consistent over time) but it can also have performance benefits, for instance helping the query planner do better with some of UDFs. Jul 17, 2020 at 9:22
  • Yes, I did enable it afterwards with errors.
    – user110366
    Jul 17, 2020 at 10:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.