SQL Server: Can INFORMATION_SCHEMA Tell Me When a SQL Object Was Created?

Posted by Jim G. on Stack Overflow See other posts from Stack Overflow or by Jim G.
Published on 2010-04-07T15:39:42Z Indexed on 2010/04/07 15:43 UTC
Read the original article Hit count: 416

Given:

  • I added a non-nullable foreign key to a table.
  • I settled on a way to populate the foreign key with default values.
  • I checked in both changes to a re-runnable DB creation script.
  • Other developers ran this script, and now they have the foreign key populated with default values on their developer machines.

A few days later however...

  • I changed my mind.
  • Now I'd like to populate the foreign key's default values differently.

My Question:

Can SQL Server or INFORMATION_SCHEMA tell me when SQL objects were created?

Ideally, I'd like to drop and re-add the foreign key if it was created before a certain date/time.

Any help or alternative strategies would be greatly appreciated.
Obviously, I'd like to avoid going to each developer's cube, asking them to drop the foreign key manually.

© Stack Overflow or respective owner

Related posts about sql-server-2000

Related posts about information-schema