How to get the date of creation of an index in SQL Server?

3

By SQL Server Management Studio I did not find in the properties of an index its creation date.

How can I get the date of creation of a specific index just by name?

    
asked by anonymous 20.01.2014 / 21:56

2 answers

5

From the documentation for Microsoft SQL Server - sys.indexes (English) , there is no field that stores the index creation date.

One search on the Microsoft SQL Server website itself reveals that this information is not stored anywhere, that only through trace created by you can you stay along with this information.

For cases where the index is also PK or UQ, the closest you actually have is the date the object was created at sysobjects (English) , more precisely the crdate field.

On other SE sites the same question has been asked over the years, and so far the answer is that it is not possible:

21.01.2014 / 01:44
-2

I'm missing MSSQL here, but try this.

 SELECT CREATE_DATE FROM SYS.INDEXES I
 INNER JOIN SYS.OBJECTS O ON I.OBJECT_ID = O.OBJECT_ID
 WHERE I.NAME = 'NOME_DO_INDICE'
    
20.01.2014 / 22:32