?
Solved

Index Creation date

Posted on 2003-03-04
5
Medium Priority
?
607 Views
Last Modified: 2006-11-17
Can someone show me how to write a query or run a stored procedure that will let me know when an index has been created?

0
Comment
Question by:djadkison
[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
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:David_Cameron
ID: 8069819
I can't comment on 2K, but for SQL7 I don't think that you can get this information. SQL Server does not provide an audit trail for changes you make to structual parts of the database. I don't think that this has changed for SQL 2K. Check Books Online under the sysindexes entry.
0
 
LVL 6

Expert Comment

by:hans_vd
ID: 8070682
Try this query:

SELECT u.name + '.' + o.name tablename,
       i.name index_name,
       o.crdate index_creation_date
FROM sysusers u JOIN
     sysobjects o ON u.uid=o.uid JOIN
     sysindexes i ON o.id=i.id
WHERE o.type='U'
  AND i.status & 64=0
  AND i.indid < 255
ORDER BY tablename, index_creation_date
0
 

Author Comment

by:djadkison
ID: 8072860
The Creation date appears to be the date of creation for the table, not the index.   I appreciate the information. It is not apparently available.
0
 
LVL 6

Accepted Solution

by:
hans_vd earned 100 total points
ID: 8072919
Pffff, I'm really having a bad day today ...

I'm sorry.
0
 

Author Comment

by:djadkison
ID: 8076844
That's okay. At least you tried to help. And for that matter, the code gave my DBA some other ideas.
Thanks again, Dave
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

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.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

762 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