SQL2008如何解决"不允许对系统目录进行即席更新"?
系统表sys.systypes中有任一数据
Name xtpye uid
dtBaseNo 106 1
要运行 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
[其他解释]
系统目录东西不能随便更改的
[其他解释]
下表列出了所有可用的配置选项、可能的设置范围及其默认值。配置选项旁的字母代码分别表示:
高级选项(只能由认证的 SQL Server 技术人员更改,并且更改前需要将 show advanced options 设为 1),用"A"标识。
需要服务器重新启动才能生效的选项,用"RR"标识。
自配置选项(由 SQL Server 根据系统需要自行配置的选项),用"SC"标识。
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
go
update sys.systypes set length =9 where uid =1 and xtype = 106
go
sp_configure 'allow updates',0
RECONFIGURE WITH override
提示
配置选项 'allow updates' 已从 0 更改为 1。请运行 RECONFIGURE 语句进行安装。
消息 259,级别 16,状态 1,第 1 行
不允许对系统目录进行即席更新。
配置选项 'allow updates' 已从 1 更改为 0。请运行 RECONFIGURE 语句进行安装。
[其他解释]