Syntax help needed - how to find the index defs

  • Folks

    I created 2 indexes today. Can't event remember against what table it was. Can you write a query that will help me find the 2 indexes and the definition.

    I am sure we can query based on todays date ( I looked in sys.objects not much help )

  • Check the default trace, DDL changes are logged in there.

    The system tables won't help you, sys.indexes does not have a create_date column

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • The STATS_DATE() function may be able to help you narrow it down... unless you rebuilt all your indexes since you added the index, or if stats have been automatically updated.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply