sp_configure错误:不支持对系统目录进行即席更新。

简介:

     今天在一台数据库服务器上(Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)     Standard Edition (64-bit))使用sp_configure更改当前服务器的全局配置设置时,遇到错误提示为“消息 5808,级别 16,状态 1,第 1 行 Ad hoc update to system catalogs is not supported”,一般对应的中文错误提示为:“消息 5808,级别 16,状态 1,第 1 行  不支持对系统目录进行即席更新”。

Code Snippet
  1. EXEC sp_configure'show advanced options', 1;
  2.  
  3. GO
  4.  
  5. RECONFIGURE;
  6.  
  7. GO
  8.  
  9. Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
  10.  
  11. 消息 5808,级别 16,状态 1,第 1 行 
  12. Ad hoc update to system catalogs is not supported.

但是如果我将RECONFIGURE 改为RECONFIGURE WITH OVERRIDE 则OK,不会有上面错误。

Code Snippet
  1. EXEC sp_configure'show advanced options', 1;
  2.  
  3. GO
  4.  
  5. RECONFIGURE WITH OVERRIDE;
  6.  
  7. GO
  8.  
  9. Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.

MSDN关于 RECONFIGURE 和 RECONFIGURE WITH OVERRIDE的解释

 

RECONFIGURE

指定如果配置设置不需要服务器停止并重新启动,则更新当前运行的值。RECONFIGURE 还会检查新的配置值中是否有无效值(例如,在 syscharsets 中不存在的排序顺序值)或非建议值。对于那些不需要服务器停止并重新启动的配置选项,其当前运行的值和当前配置的值在指定 RECONFIGURE 之后应当相同。

 

WITH OVERRIDE

禁用对 recoveryinterval 高级配置选项的配置值检查(以查找无效值或非建议值)。

任何配置选项都可以通过使用 WITH OVERRIDE 选项来重新配置。另外,RECONFIGURE WITH OVERRIDE 使用指定值强制重新配置。例如,可使用大于 maxservermemory 配置选项中指定的值来配置minservermemory 配置选项。但是,这将被认为是错误。因此,指定 RECONFIGURE WITH OVERRIDE 将不禁用配置值检查。

一般造成上面错误的原因是因为allow_updates被设置为1,关于allow updates选项的MSDN解释

allow updates Option
This option is still present in the sp_configure stored procedure, although its functionality is unavailable in SQL Server. The setting has no effect. Starting with SQL Server 2005, direct updates to the system tables are not supported.
Important:
This feature will be removed in a future version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible.
Changing the allow updates option will cause the RECONFIGURE statement to fail. Changes to the allow updates option should be removed from all scripts.

此选项仍然存在于 sp_configure 存储过程中,但是其功能在 SQL Server 中不可用。其设置不起作用。从 SQL Server 2005 开始,不支持直接更新系统表

更改 allow updates 选项将导致 RECONFIGURE 语句失败。 应当从所有脚本中删除对 allow updates 选项的更改。

我检查了一下数据库关于'allow_updates' 选项的config_value和 run_value,果然发现其值为1,使用sp_configure将其置为0后,使用RECONFIGURE时,不会出现上面错误

Code Snippet
  1. EXEC sp_configure 'allow_updates'
  2.  
  3.      name         minimum     maximum   config_value run_value
  4.  
  5. ------------- ----------- ----------- ------------ -----------
  6.  
  7.  allow updates      0           1           1            1
  8.  
  9. EXEC sp_configure 'allow_updates',0;
  10.  
  11. GO
  12.  
  13. RECONFIGURE WITH OVERRIDE;
  14.  
  15. GO
  16.  
  17. EXEC sp_configure 'show advanced options', 1;
  18.  
  19. GO
  20.  
  21. RECONFIGURE;
  22.  
  23. GO
  24.  
  25. Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
  26.  
  27. EXEC sp_configure'show advanced options', 1;
  28.  
  29. GO
  30.  
  31. RECONFIGURE;
  32.  
  33. GO
  34. 配置选项 'show advanced options' 已从 1 更改为 1。请运行 RECONFIGURE 语句进行安装
相关文章
|
Oracle 关系型数据库 Unix
Oracle11G R1/R2官方下载列表
                                                              Oracle11G R1/R2官方下载列表   直接右键点击链接即可下载,但是建议用迅雷下载,快车等P2P工具下载,比较快~ Oracle Database 11g Release 2 (11.
10542 0
|
SQL 数据库
如何把高版本的sqlserver 还原到低版本的 sqlserver_kaic
如何把高版本的sqlserver 还原到低版本的 sqlserver_kaic
|
8月前
|
域名解析 缓存 网络协议
阿里企业邮箱如何设置域名DNS解析?
阿里企业邮箱如何设置域名DNS解析?
1125 2
阿里企业邮箱如何设置域名DNS解析?
|
编解码 虚拟化 Windows
Hyper分辨率调整是确保虚拟机图形表现符合期望的重要步骤,怎么调呢
在Hyper-V中调整虚拟机分辨率是确保图形表现符合预期的重要步骤。首先,通过增强会话模式调整:打开Hyper-V管理器,启用增强会话模式,启动虚拟机后在桌面右键选择“屏幕分辨率”进行设置。其次,在虚拟机内部(Windows系统)右键点击桌面空白处,选择“显示设置”,调整分辨率并应用更改。注意事项包括:确保安装Hyper-V集成服务、以管理员权限操作、注意虚拟机类型兼容性、检查显卡驱动并备份数据。这些步骤能帮助你顺利完成分辨率调整。
|
算法 Java Android开发
Android查看获取MD5和SHA1值(应用签名)
方法一:C:\Users\Administrator>"C:\Program Files\Java\jre1.8.0_131\bin\keytool.exe" -list -v -keystore "E:\WebView\ceshi.jks"
3381 0
|
安全 数据库
数据库——报错:无法创建链接服务器 “(null)“ 的 OLE DB 访问接口 “Microsoft.Ace.OLEDB.12.0“ 的实例。
数据库——报错:无法创建链接服务器 “(null)“ 的 OLE DB 访问接口 “Microsoft.Ace.OLEDB.12.0“ 的实例。
数据库——报错:无法创建链接服务器 “(null)“ 的 OLE DB 访问接口 “Microsoft.Ace.OLEDB.12.0“ 的实例。
|
SQL 存储 数据管理
SQL Server 2019 Express 及 SSMS18 下载安装配置教程(一)
SQL Server 2019 Express 及 SSMS18 下载安装配置教程
4018 0
SQL Server 2019 Express 及 SSMS18 下载安装配置教程(一)
|
SQL JavaScript 数据库
sqlite在Windows环境下安装、使用、node.js连接
sqlite在Windows环境下安装、使用、node.js连接

热门文章

最新文章