May 30, 2013 at 11:57 am
I would like to display x amount of views (50) in one report then in that same report display which views that have not been accessed and their fields.
May 30, 2013 at 2:57 pm
You should read this: http://www.sqlservercentral.com/articles/Best+Practices/61537/
What you've posted isn't clear and doesn't give enough information to begin to build a solution.
May 30, 2013 at 3:46 pm
Grant provided an answer already on your post at ask.ssc.com.
http://ask.sqlservercentral.com/questions/103091/report-of-all-views.html
In your reply you indicated that you do not have any trace or extended events running. That means you basically have no chance of providing an accurate list of what views are being utilized.
Getting a list of 50 views seems a little strange to me. Why 50?
To get a listing of all views you can easily query sys.objects.
select * from sys.objects where type = 'V'
If you want to also see the columns just join to sys.columns.
select *
from sys.objects so
join sys.columns sc on so.object_id = sc.object_id
where type = 'V'
order by so.name, sc.column_id
Without some way of tracing there is no way to determine if they are in use or not.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply