Re: Index Creation Date
From: Sue Hoegemeier (Sue_H@nomail.please)
Date: 06/27/02
- Next message: Sue Hoegemeier: "Re: Index Creation Date"
- Previous message: Sue Hoegemeier: "Re: SQL2k Sqlagentproxy fails to logon"
- In reply to: Anith Sen: "Re: Index Creation Date"
- Next in thread: Anith Sen: "Re: Index Creation Date"
- Reply: Anith Sen: "Re: Index Creation Date"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Sue Hoegemeier <Sue_H@nomail.please> Date: Thu, 27 Jun 2002 13:21:29 -0600
Anith,
When I run this on SQL Server 2000, SP2, the crdate for
indexes is the create date for the table not for the index.
-Sue
On Thu, 27 Jun 2002 13:55:54 -0500, "Anith Sen"
<anith@bizdatasolutions.com> wrote:
>Join sysindexes and sysobjects and use the crdate in the
>sysobjects table. Read details on SQL Server Books Online.
>
>SELECT
> u.name + '.' + o.name tablename,
> i.indid,
> i.name index_name,
> CASE WHEN (i.status & 2)<>0 THEN 'yes' ELSE 'no' END unq,
> CASE WHEN (i.status & 2048)<>0 THEN 'yes' ELSE 'no' END prm,
> CASE WHEN (i.status & 16)<>0 THEN 'yes' ELSE 'no' END clu,
> o.crdate
>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,
> prm DESC,
> i.indid
>
>- Anith
>
>
>"Puneet Parashar" <parashar22@hotmail.com> wrote in message
>news:epUludgHCHA.2436@tkmsftngp10...
>> Hi,
>>
>> My developers are creating many indexes by themseleves, and i want to
>> know when was the index created. i looked into sysindexes table but that
>> does not have any information about the creation date of the index. If
>> any one can help me to determine the date on which indexes were
>> created/recreated that would be a great help.
>>
>> Thanks,
>> Puneet
>>
>>
>>
>> *** Sent via Developersdex http://www.developersdex.com ***
>> Don't just participate in USENET...get rewarded for it!
>
- Next message: Sue Hoegemeier: "Re: Index Creation Date"
- Previous message: Sue Hoegemeier: "Re: SQL2k Sqlagentproxy fails to logon"
- In reply to: Anith Sen: "Re: Index Creation Date"
- Next in thread: Anith Sen: "Re: Index Creation Date"
- Reply: Anith Sen: "Re: Index Creation Date"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|