Wednesday, March 7, 2012

Getting last modify date of table design

Hi,
I was wondering whether there is a way to get the last modify date of the
table schema. Let's say someday I added a column to a table, will the system
capture the day? I want this information.
Thanks in advance.
Regards,
Jason ChanI'm not familiar with a way to achieve this in SQL Server 2000.
Not that it helps you now, but in SQL Server 2005 you'll be able to create
DDL triggers that record schema change datetime.
BG, SQL Server MVP
www.SolidQualityLearning.com
"Jason Chan" <no@.email.com> wrote in message
news:%23AYe2$MmFHA.4056@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I was wondering whether there is a way to get the last modify date of the
> table schema. Let's say someday I added a column to a table, will the
> system
> capture the day? I want this information.
> Thanks in advance.
> Regards,
> Jason Chan
>|||It is not possible to know until you do it manually (by writing the
information in text or excel file whenever you alter the table)
Madhivanan|||> I was wondering whether there is a way to get the last modify date of the
> table schema.
Unless the table was dropped and created, this information is not stored
anywhere (you need to add this kind of auditing yourself, and in any version
prior to SQL Server 2005, the only way to do this is to funnel all table
modifications via stored procedures or application code).
Another possible idea, if this information is really crucial *and* if you
keep a series of backups around, is that you can restore and inspect each
backup and get a rough idea of the date the table started looking different.
This question comes up A LOT and I'm really amazed at the number of people
who have never heard of source control or following some kind of deployment
standards/practices. Everybody seems to shoot from the hip, and given all
of that, it's really not surprising to me that so many of them suddenly need
to know what happened to screw up their entire schema.

No comments:

Post a Comment