sp_configure

sp_configure 'xp_cmdshell',1 RECONFIGURE

在设置选项并发出 
RECONFIGURE(在某些情况下 RECONFIGURE WITH OVERRIDE)语句之后立即生效。

若要用 sp_configure 配置高级选项,必须首先在将 show advanced options 选项设置为 
1 的情况下运行 sp_configure,然后运行 RECONFIGURE: 

sp_configure 
'show advanced options'1
GO
RECONFIGURE
GO
sp_configure 
'cursor threshold'0
GO
RECONFIGURE
GO
原文地址:https://www.cnblogs.com/Ammy/p/1234647.html