Solved

SQL Tables/Fields Used the Most Frequently

Posted on 2015-02-23
8
40 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:
ScottPletcher 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 45

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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 45

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:ScottPletcher
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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

758 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

18 Experts available now in Live!

Get 1:1 Help Now