I'm writing a sql script to handle updating a database from v1.0 of an app to v1.1.
I'm modifying a table that a view was created against with schemabinding.
Is there a way (using SQL) to momentarily turn off schemabinding for the view, modify the table, then turn schemabinding back on?
Or am I going to have to drop the view, modify the table, then recreate the view?
asked Apr 26, 2010 at 06:12 PM in Default
It's drop the view (and anything else in the dependency tree that depends on that view) and then re-create it. SSMS behaves in funny ways when doing these things sometimes (for example, helpfully dropping SCHEMABINDING left right and centre) - so tread carefully when making changes from within that particular IDE.
One day I will support this style of operation in my tools, but it's a long way off because I have heaps of other stuff to write first, and I can't think of any alternatives off the top of my head, sorry.
answered Apr 26, 2010 at 06:22 PM
Matt Whitfield ♦♦