SQL Server Views - Dependency and INFORMATION_SCHEMA.VIEW_TABLE_USAGE

I'm trying to find out all dependencies for given views.
I tried all available method
- EXEC sp_depends
- EXEC sp_MSdependencies
- sys.sql_dependencies table
- INFORMATION_SCHEMA.VIEW_TABLE_USAGE

All above work only few views and not all.
Why is this information available for only few and not all views?
LVL 1
rahulsuryaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chapmandewCommented:
dependencies only work if sql is able to keep track of the dependency when the object is created....not accurate really in versions previous to 2008.
0
rahulsuryaAuthor Commented:
Can i rebuild dependencies or is there a way i can find out all base tables a view uses?
0
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
SQL Server's internal tracking of dependencies is not accurate and hence there might be some information missing for some views..
And hence the below third party tools

* Red gate Dependency Tracker (http://www.red-gate.com/products/SQL_Dependency_tracker/index.htm)
* Apex SQL Clean (http://www.apexsql.com/sql_tools_clean.asp)

gained more popularity in these areas..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chapmandewCommented:
you could, but there isn't an easy way to go it, unfortunately.

apexsql.com has a dependency tracker that is really good for doing this. I use it exclusively rather than rely on how sql tracks the dependencies for 2005 and prior instances.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.