After applying my database changes on the test environment, the test team starts testing their processes, one of the things I get is a truncate table error because the table is used in an indexed view.
(1 row(s) affected)
ProductIconTypes ending
ProductImageCategories starting
Msg 3729, Level 16, State 2, Line 1
Cannot TRUNCATE TABLE 'dbo.ProductImageCategories'
because it is being referenced by object 'VWProductImageGetByStyle'.
Questions:
next time I want to put an indexed view on one of my databases what exactly I should be checking?
Can I get this done through my favourite route (T-SQL)?
I would not mind powershell either.
unfortunatelyUnfortunately on these servers in question we are still on sqlSQL Server 2005 AND sqlSQL Server 2008 R2.
A Comment:
theseThese versions impose a lot of limitations on things that we can do as alternatives. Filtered indexes for instance are not available on sqlSQL Server 2005.
I am actually looking for a way if possible to find out what would stop working if I created this indexed view. In my example, the truncate tables could no longer work.