Configuração geral com sp_configure e RECONFIGURE
SQL ServerConfiguraçãoComando
EXEC sys.sp_configure 'show advanced options', 1;
RECONFIGURE;
-- Example: cost threshold for parallelism and MAXDOP:
EXEC sys.sp_configure 'cost threshold for parallelism', 50;
EXEC sys.sp_configure 'max degree of parallelism', 4;
RECONFIGURE;
-- Show all configured/running values:
SELECT name, value AS configured, value_in_use AS running, is_dynamic, is_advanced
FROM sys.configurations
ORDER BY name;O que faz
Define valores de configuração no nível do servidor; RECONFIGURE os aplica ao valor em execução.
Quando usar
Ao alterar configurações do servidor como MAXDOP, o limite de paralelismo ou optimize for ad hoc workloads.
Atenção
Configurações com is_dynamic = 0 exigem restart do SQL Server. RECONFIGURE WITH OVERRIDE ignora a validação de algumas configurações; use com cuidado. Anote o value_in_use antes de alterar qualquer coisa.