jenlion
IS-IT--Management
- Nov 13, 2001
- 215
Is there a SQL command that will provide a list of views that reference a given table or view?
Here's my problem: I added a column to a view in a production database. Normally I don't like to do this, but it's an eensy-weensy change, I've done it before, and they really needed it. And it's just a view.
Well, it turns out there's ANOTHER view that references this view. It does a union of this view with another view that had the same column list.
Once I added a column, the two views were out of whack (they were both "select *"). Caused a major problem.
Good news is I solved major problem. Bad news is major problem was my own d*** fault.
Is there some sp_help something that I can run to check for this before I screw something else up next time?
Here's my problem: I added a column to a view in a production database. Normally I don't like to do this, but it's an eensy-weensy change, I've done it before, and they really needed it. And it's just a view.
Well, it turns out there's ANOTHER view that references this view. It does a union of this view with another view that had the same column list.
Once I added a column, the two views were out of whack (they were both "select *"). Caused a major problem.
Good news is I solved major problem. Bad news is major problem was my own d*** fault.
Is there some sp_help something that I can run to check for this before I screw something else up next time?