I was having trouble finding this post on the old SMSandMOM blog without a direct link, and saw this question asked on an alias so I thought it would be worth posting again on the new blog site for ConfigMgr 2007. This post describes how to move the Site Database for Configuration Manager 2007 to another drive, or another computer running SQL 2005.
INTRODUCTION This article describes how to move the Site Database in Microsoft System Center Configuration Manager 2007 from a computer that is running Microsoft SQL Server 2005 to another drive on the same computer, or to another computer that is running SQL Server 2005.
MORE INFORMATION In certain situations, you may have to move the Site Database from a computer that is running SQL Server 2005 to another drive, or to another computer that is running SQL Server 2005. For example, the following situations may require that you move the Site Database:
SQL Server 2005 supports the following:
For more information about these functionalities in SQL Server 2005, visit the following Microsoft Web site: http://technet.microsoft.com/en-us/library/ms203721.aspx
PREREQUISITES Before you move the Site Database from a computer that is running SQL Server 2005 to another drive or another computer that is running SQL Server 2005, follow these steps:
Note: You can stop all of these services using the Preinst.exe utility by running the following command without the quotes:
Preinst.exe is included with Microsoft System Center Configuration Manager 2007 Server and is located in the following path:
Drive:\Program Files\Microsoft Configuration Manager\bin\i386\00000409 (the last folder is dependent upon the language of the product, 00000409 is for the English version).
Note: If you are running the SMS Provider and the Site Database on the same SQL 2005 Server, and you are moving the Site Database to a new server, you will also need to modify the SMS Provider Configuration in order to move it as well, For more information about moving the SMS Provider in Microsoft System Center Configuration Manager 2007, visit the following Microsoft Web site: http://technet.microsoft.com/en-us/library/bb693923.aspx.
MOVING THE DATABASE To move the Site Database from a computer that is running SQL Server 2005 to another drive or another computer that is running SQL Server 2005, follow these steps:
Step 1: Detach the database 1. On the computer that currently hosts the Site Database, click Start, point to Programs, point to Microsoft SQL Server 2005, and then click SQL Server Management Studio.
2. Click the appropriate values in the Server type list, in the Server name list, and in the Authentication list. Then, click Connect.
3. Expand the Databases folder, right-click the SMS_<DatabaseName> folder, point to Tasks, and then click Detach. Note that the Detach command is visible only if the following conditions are true:
• You are a member of the sysadmin fixed server role. • The server to which you are connected is running SQL Server 2005.
4. Verify the status of the Site Database. Note that to successfully detach the Site Database, the status in the Databases to detach box in the Status column must read: "The database is ready to be detached." Optionally, you can update statistics before the detach operation. To do this, select the check box under the Update Statistics column in the Databases to detach box.
5. To close any existing connections in the Site Database, select the check box under the Drop Connections column in the Databases to detach box.
6. Click OK. The database node of the detached Site Database disappears from the Databases folder.
7. After the Site Database is detached, copy the SMS_<DatabaseName>.mdf file and the SMS_<DatabaseName>.ldf file to the drive and path you want to move it to, or to a folder on the computer to which you want to move the Site Database.
Note: The following path is the default path of the SMS_<DatabaseName>.mdf file:
Drive :\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
The following path is the default path of the SMS_<DatabaseName>.ldf file:
Step 2: Attach the database
1. Click Start, point to Programs, point to Microsoft SQL Server 2005, and then click SQL Server Management Studio.
3. Right-click the Databases folder, and then click Attach. Note The Attach command is visible only if the following conditions are true:
4. In the Attach Databases dialog box, click Add to specify the database that you want to attach.
5. Locate and then click the SMS_<DatabaseName>.mdf file. Then, click OK.
Note The following path is the default path of the SMS_<DatabaseName>.mdf file: Drive :\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
6. On the View menu, click Refresh to view the database node of the attached Site Database.
Note: If you moved the Site Database files to another drive on the same computer, then your move is complete, and you can start the following services:
Step 3: Update the database server name
If you moved the Site Database to another server, you need to run the Microsoft System Center Configuration Manager Setup Wizard on the Microsoft System Center Configuration Manager 2007 Server to modify the SQL Server configuration to specify the new SQL Server name.
1. Ensure the primary site server computer account has administrative privileges over the new site database server computer.
2. Close any open Configuration Manager console connections to the site server.
3. On the primary site server computer, use the hierarchy maintenance tool (Preinst.exe) to stop all site services with the following command: Preinst /stopsite.
4. On the primary site server computer, click Start, click All Programs, click Microsoft System Center, click Configuration Manager 2007, and click ConfigMgr Setup, or navigate to the .\bin\i386 directory of the Configuration Manager 2007 installation media and double-click Setup.exe.
5. Click Next on the Configuration Manager Setup Wizard Welcome page.
6. Click Perform site maintenance or reset this site on the Configuration Manager Setup Wizard Setup Options page.
7. Select Modify SQL Server configuration on the Configuration Manager Setup Wizard Site Maintenance page.
8. Enter the appropriate SQL Server name and instance (if applicable) for the new site database server as well as the site database name on the Configuration Manager Setup Wizard SQL Server Configuration page.
9. Configuration Manager Setup performs the SQL Server configuration process.
10. Restart the primary site server computer, and verify the site is functioning normally.
Note: If you also need to move the Software Update Services Database (SUSDB) you will need to stop IIS Admin Service, and Update Services Service and follow Steps 1 and 2 above to detach, then move the SUSDB.MDF and SUSDB.LDF files, then attach the SUSDB.MDF, in the new drive location or on the new SQL Server 2005.
Clifton Hughes | Senior Support Engineer – System Center
First have a SCCM documentation (compile html file ) infront of you which comes with SDK installation.
Then follow steps as follows :
-System Center Configuration Manager Software Development Kit
goto : Configuration Manager Console Extension
goto:Configuration Manager Console Views
goto:How to Create a Configuration Manager Console View
In this page upto step 14 its okay.Then its says the following things.
Create the Form View Class
The following procedure creates the SmsFormViewBase derived class.
To create a form view class
In ConfigMgrDialog.cs , add the following new class in the Microsoft.ConfigurationManagement.AdminConsole.ConfigMgrPropertySheet namespace:
I was pretty surprised from where did the ConfigMgrDialog.cs came into picture. When i checked my project explorer there was no class with this name. I tried to search it in the whole documentation to see if the class has been created in some other document but it dosen't exit anywhere. I am totally stuck.
Can anyone throw some light and tell me what is going on?
The steps are identical SQL 2005 to SQL 2008?
I intend to move the SCCM SQL 2005 to 2008.
Thanks for the help.
Would this work for moving the database from sql 2005 to a SQL 2008/R2?
Any chance of repeating the tutorial for moving the database between two SQL Server 2008 instances?