Create date of an object

  • Hi!

    I was wondering if we can modify the create date of an object (e.g. tables, views, etc.) in a database. If so, how can we do that? Any help will be greatly appreciated!

    Thank you!

    Wan

  • Why would you want to modify the create date of an object unless you were trying to hide something???

     

     

    Hope this helps...

    Ford Fairlane
    Rock and Roll Detective

  • I restored a db.  However, the create date for the db and its objects are different from the original one.  That's why I was wondering if we can modify the create date.

    Has any of you experienced this before?

    Thanks,

    Wan

     

  • Yes, I had a similar issue a while back. Database crashed..and developers needed create date to know what they worked on( they didn't use source control!). The simple answer is after spending a day or two on this..I wasn't able to find a simple and safe way to restore with the exact timestamps as the original database.

    HTH


    Mathew J Kulangara
    sqladventures.blogspot.com

  • You can use the following:

     

    USE master

    EXEC sp_configure 'allow updates', '1'

    go

    RECONFIGURE WITH OVERRIDE

    go

    use [db-to-update-the-objects-in]

    update sysobjects

    set crdate = '01 Jan 2006'

    go

    USE master

    EXEC sp_configure 'allow updates', '0'

    go

    RECONFIGURE

    go

  • Hi! All,

    Thanks for sharing your knowledge and information with me!  It helps.....

    Wan

     

Viewing 6 posts - 1 through 5 (of 5 total)

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