February 14, 2006 at 5:05 pm
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
February 14, 2006 at 5:38 pm
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
February 14, 2006 at 7:12 pm
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
February 14, 2006 at 8:56 pm
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
February 15, 2006 at 10:07 am
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
February 17, 2006 at 11:24 am
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