Solved

SQL Tables/Fields Used the Most Frequently

Posted on 2015-02-23
8
43 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
  • 4
  • 2
  • 2
8 Comments
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 250 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 46

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 250 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
 

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 46

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 69

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now