Solved

index  - last use and update

Posted on 2016-08-17
8
66 Views
Last Modified: 2016-08-22
Hi experts

Please, give me T-SQL
1. Get the last index update date (insert, update, delete)
2. Get the last date of use of the index

What I wish is to determine which indexes are not used to remove
0
Comment
Question by:enrique_aeo
[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
  • 3
  • 2
8 Comments
 
LVL 12

Accepted Solution

by:
Máté Farkas earned 500 total points
ID: 41760692
There is a built-in report in SQL Server Management Studio for this purpose:
Right click on your database >>> Report >>> Standard reports >>> Index Usage Statistics

In this report you can all the information you requested.

You can access these data with the following DMVs:
SELECT * FROM sys.dm_index_usage_stats
SELECT * FROM sys.dm_db_index_operational_stats (NULL, NULL, NULL, NULL)    

Open in new window

0
 

Author Comment

by:enrique_aeo
ID: 41761884
the day yesterday was reviewing the url that an expert put it, because they have erased? it could re-post?
0
 

Author Comment

by:enrique_aeo
ID: 41763976
The links provided were interesting, I need them.

I think if the expert does not put comments, should not eliminate, the expert should add any comments by the link.

Based on your experience, you definitely have the best articles I could find.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 49

Expert Comment

by:Vitor Montalvão
ID: 41764899
Another blind link comment deleted.
0
 
LVL 49

Expert Comment

by:Vitor Montalvão
ID: 41764901
Enrique, the links provided refers to the two DMV in Máté's comment.
I guess you know how to use a search engine to get more information about those DMV :)
0
 

Author Closing Comment

by:enrique_aeo
ID: 41766033
0

Featured Post

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replication failure 1 19
SQL 2014 missing dll from Bin? 3 31
SQL Server In place upgrade from 2012 to 2014 12 19
Database Mail Profiles 1 18
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

740 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