patternsqlModerate
SQL Server 2014 - Reset everything
Viewed 0 times
sqleverythingserver2014reset
Problem
Short of reinstalling the software, is there a simple way to 'start from scratch' with a SQL instance? By that I mean:
I can't find anything online on how to do this.
- Remove all created logons,
- Remove all added databases,
- Reset system databases,
- Remove any new configuration,
- Reset any SQL Server Agent configuration
I can't find anything online on how to do this.
Solution
You should rebuild the system databases.
This would not remove the data and log files relating to the old databases - it just removes all references to them. You would have to manually remove the files to free up the disk space.
You must also install all service packs and hotfixes again.
Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=InstanceName /SQLSYSADMINACCOUNTS=accounts [ /SAPWD= StrongPassword ] [ /SQLCOLLATION=CollationName]This would not remove the data and log files relating to the old databases - it just removes all references to them. You would have to manually remove the files to free up the disk space.
You must also install all service packs and hotfixes again.
Code Snippets
Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=InstanceName /SQLSYSADMINACCOUNTS=accounts [ /SAPWD= StrongPassword ] [ /SQLCOLLATION=CollationName]Context
StackExchange Database Administrators Q#97666, answer score: 14
Revisions (0)
No revisions yet.