April 4, 2008 at 7:54 pm
Hello,
In SQL 2000, I was able to issue a SQL statement like this to update the Create Date:
update sysobjects
set crdate = getdate()
where name = 'CUSTOMER'
How would I issue a similar command in SQL 2005?
April 4, 2008 at 7:56 pm
In no way you can update system table in sql server 2005.
NJ
April 4, 2008 at 8:46 pm
you could try renaming the table, create a new one, and copy the data back. i dont think I would recommend, but that is an option
-- Cory
April 4, 2008 at 8:53 pm
You could also maintain a separate table with all of your table names and the other pertinent information you need. Then set up DDL triggers on each of your tables, so you can capture what change occurred and when it occurred.
You can then reference this table to determine when the table was last modified.
April 5, 2008 at 9:59 pm
Although it is not recommended but still if you want to change value in system table. You may do it by starting sql server using -f switch.
like:
sqlservr -f
[font="Verdana"]--www.sqlvillage.com[/size][/font]
April 6, 2008 at 10:39 pm
Updating system tables in SQL 2005 is possible if you login as Dedicated adminstrator!! DAC has the privilege to update system table. Refer the below link for DAC.
Dedicated Administrator Connection
http://msdn2.microsoft.com/en-us/library/ms189595.aspx
Regards..Vidhya Sagar
SQL-Articles
April 6, 2008 at 11:23 pm
This is the second time this same question has been asked... and just like I said on that identical post, directly updating system tables is a form of "Death by SQL".
Just don't do it.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply