Before upgrading SCCM 2012 to for example 2012 R2 we should test the upgrade on a copy of the database.
The documentation states: Make a copy of the site database, and then restore that copy to an instance of SQL Server that uses the same edition as your site database and that does not host a Configuration Manager site. For example, if the site database runs on an instance of the Enterprise edition of SQL Server, make sure you restore the database to an instance of SQL Server that also runs the Enterprise edition of SQL Server.
If the SQL server is running on a virtual machine then it might for some be nice to just test it on a clone of the production server without network connectivity.
If you try it you will see this error: SQL instance hosting an active site Database – Cannot run TESTDBUPGRADE on a SQL Instance which host an active site Database. And Begin TestDBUpgrade is unavailable (grayed out).
If you delete the key HKEY_LOCAL_MACHINESOFTWAREMicrosoftSMS
After deleting the registry key you will be allowed to run TestDBUpgrade.