要运行 update sys.systypes set length =9 where uid =1 and xtype = 106 提示
不允许对系统目录进行即席更新
如何解决? ------最佳解决方案-------------------- sp_configure 'allow updates',1
RECONFIGURE WITH override
go
UPDATE syscolumns SET colid=colid+1
WHERE id=object_id('employee')
update syscolumns set colid=1
where id=object_id('employee') and name='test1'
go
sp_configure 'allow updates',0
RECONFIGURE WITH override
sp_configure 'allow updates',1
RECONFIGURE WITH override
go
update sys.systypes set length =9 where uid =1 and xtype = 106
go
sp_configure 'allow updates',0
RECONFIGURE WITH override
------其他解决方案-------------------- 在 sql server 2005 和 sql server 2008 中,sys.systypes 是兼容视图,不允许直接更新,即使设置了 allow updates 选项。