Is there an sp_reset or the equivalent? Let's say I was monkeying around on SQL Server and I wanted to reset everything to factory defaults, is that currently possible?

EXEC sp_configure 'show advanced options', 1
EXEC sp_configure 'stupid dangerous thingz', 1


I want to do something like

EXEC sp_factory_reset, 1
sp_blitz will show you all non-default configuration settings and the details show what the default is.



Another option would be to use dbatools to export the config on a fresh install, using export-dbaspconfigure. Then import when you want to reset, using import-dbaspconfigure.

Export-DbaSpConfigure -ServerInstance . -path c:\temp\sp_configure.sql


This will create a file with all sp_configure options in this format

EXEC sp_configure 'show advanced options' , 1;  RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'recovery interval (min)' , 0;
EXEC sp_configure 'allow updates' , 0;
EXEC sp_configure 'user connections' , 0;
EXEC sp_configure 'locks' , 0;
EXEC sp_configure 'open objects' , 0;
EXEC sp_configure 'fill factor (%)' , 0;
EXEC sp_configure 'disallow results from triggers' , 0;


Then you can either run this file or the import-spdbaconfigure command, which will run the script for you

import-DbaSpConfigure -ServerInstance . -path c:\temp\sp_configure.sql