1. On the Configuration Manager site server, stop the following services:
SMS Agent Host (on the server where the management point for that site is installed)
2. On the SQL Server stop the following service:
3. Perform the following SQL commands or manually right-click and choose the Tasks->Detach option.
EXEC sp_detach_db @dbname = '<DB Name>';
4. Attach the database either using the SQL commands below or manually by using the Databases->Attach option. If you're doing it manually, make sure that the Attach As column has the correct DB name in upper case.
CREATE DATABASE <DB Name in upper case>
ON (FILENAME = '<SQL DB file path>\<db>.mdf'),
(FILENAME = '<SQL DB log file path>\<db>.ldf')
4. Restart the services on the SQL server and the Configuration Manager server.
Article ID: 2733915 - Last Review: 25 Jul 2012 - Revision: 1