Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Tables/Fields Used the Most Frequently

Posted on 2015-02-23
8
Medium Priority
?
51 Views
Last Modified: 2015-02-24
Hi Experts,

I've run into a bit of an interesting issue. I was tasked with ID'ing which tables (or more so, fields) are being accessed the most frequently in our SQL Server 2008 database in order to determine the most commonly used fields. I'm able to get table row counts, but this doesn't tell me how long ago the table was accessed (could be old data). I've come across sys.dm_db_index_usage_stats, however I don't have permissions to run it.

So, my question: can anyone think of a way to solve this issue when your permissions aren't too high?

Thanks in advance for all your help!
0
Comment
Question by:uga_godawgs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 70

Accepted Solution

by:
Scott Pletcher earned 1000 total points
ID: 40626937
No.  You will definitely need access to the system views, at the very least, to determine how frequently a given table is used.
0
 

Author Comment

by:uga_godawgs
ID: 40627917
Hi Scott,

Thank you for your answer and here's some more detail that might help. I'm able to get to some of the system views, such as sys.partitions, sys.syscolumns, sys.tables and sys.objects. It seems like sys.dm_db_index_usage_stats is one of the few that I cannot access. Does this help develope a solution?

Thanks!
0
 
LVL 52

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 1000 total points
ID: 40627978
You can know when a table was accessed but for that you really need access to sys.dm_db_index_usage_stats.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:uga_godawgs
ID: 40628193
OK. Thanks for both of your help. Any idea what access I would need to request? Hopefully, it's not admin...
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 40628209
Requires VIEW SERVER STATE permission.
0
 

Author Comment

by:uga_godawgs
ID: 40628282
As always, Experts, I thank you for your help!
0
 
LVL 70

Expert Comment

by:Scott Pletcher
ID: 40628646
Books Online is very helpful on what permissions you'll need for various objects.

For example, look under:
sys.dm_db_index_usage_stats
in BOL, "Permissions", and you'll see the "VIEW SERVER STATE" referenced above.
0
 

Author Comment

by:uga_godawgs
ID: 40628759
Thanks Scott..wasn't aware of BOL and will definitely take advantage in the future! Thanks again!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question