• You should move Master via the SQL startup parameters.  Never try to detach Master, because if somehow it does succeed you will never get it back.

    TempDB should only be moved via a ALTER DATABASE statement.  If you detach it, it will NOT re-attach using the correct database id.  You will end up with a TempDB that cannot be used.  You can zap master..sysdatabases if you try hard enough to set TempDB back to ID 3, but this is really messy...

    Beyond that, it does not matter which order you move model, msdb, and user databases.

    However, if you detach model you MUST re-attach it before you detach anything else.  Likewise with msdb.  Otherwise these critical databases will get the wrong database id and things will not work properly if at all...

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara