Share via


Moving Data Files for Windows Essential Business Server

You can move the data files and databases that contain information for the product technologies that are installed in the Windows® Essential Business Server (EBS) infrastructure.

Important

Before you move data, you should always back up the data. For more information about backing up data, see Backing Up the Windows Essential Business Server Infrastructure.

This document provides procedures that you can use to move data files and databases for the following product technologies:

  • System Center Essentials 2007 (Essentials 2007) including Windows Update Services (WSUS)

  • Microsoft Forefront Security for Exchange Server

  • Exchange Server 2007

  • Windows SharePoint Services

Moving data files and databases for Essentials 2007

You can move the following data files and databases associated with Essentials 2007:

  • Data files, log files, and databases for Essentials 2007

  • Data files, log files, and databases for Windows Server Update Services (WSUS)

  • Update files from Microsoft Update (if applicable)

    Note

    Update files are required for installing software updates. If you store update files on the Microsoft Update Web site, there is no local update file storage folder on Management Server.

The following procedure enables you to locate the names of the SQL Server 2005 databases. You use the names to change the location of the data files for Essentials 2007 and WSUS that are associated with the SQL Server 2005 database.

To locate the SQL Server 2005 instance that contains Essentials 2007 and WSUS databases

  1. You can find the SQL Server 2005 instance that contains the Essentials 2007 database in the following registry location on the Management Server:

    HKLM\Software\Microsoft\Microsoft Operations Manager\3.0\Setup\DatabaseName
    

    Record the name because you will need it to locate the data and log files for the database in the following procedure.

  2. You can find the SQL Server 2005 instance that contains the WSUS database in the following registry location on the Management Server:

    HKLM\Software\Microsoft\Update Services\Server\Setup\SqlServerName
    

    Record the name because you will need it to locate the data and log files for the database in the following procedure.

To locate the data and log files for a database

  1. Open SQL Server Management Studio Express and connect to the instance that contains the database.

  2. Click the Databases node, and select the database that you identified in the previous procedure.

  3. Right-click the database name and click Properties.

  4. In the Database Properties dialog box, click Files.

  5. The locations of the data files and log files are specified in the Path column.

    Note

    If the WSUS database is hosted under the Windows Embedded SQL Server instance, the registry key HKLM\Software\Microsoft\Update Services\Server\Setup\SqlServerName points to the embedded SQL Server instance that is represented by %computername%\MICROSOFT##SSEE. The data and log files are stored in the %systemdrive%\WSUS\MSSQL$WSUS folder, unless you specified a different folder during the WSUS installation.

Before you can move files, you must stop the services that are using the files.

To stop the services that use the files

  1. On the Management Server, stop the following services:

    • OpsMgr Health Service

    • OpsMgr Config Service

    • OpsMgr SDK Service

    • OpsMgr VSS Writer Service

    • Update Services

  2. To move the WSUS files, you must run the IISReset command on the Management Server. In a Command Prompt window, type the following command:

    IISReset /stop
    

To move the Essentials 2007 and WSUS data files

  1. If you have not already done so, open SQL Server Management Studio Express and connect to the instance that is hosting the desired data.

  2. You must detach the SQL Server database before you can change the location of the files. In the query pane, type the following commands and click Execute:

    use master 
    go 
    sp_detach_db <DatabaseName> 
    go
    

    Replace DatabaseName with the name of the database.

  3. Move or restore from a backup the Essentials 2007 data files to a folder on the network where the Management Server can access them.

  4. When you attach the database, you specify the new location of the files. In the query pane of SQL Server Management Studio Express, type the following commands and click Execute:

    use master 
    go 
    sp_attach_db <DatabaseName>,<Path>\<DatabaseName>.mdf>,<Path>\<DatabaseName>.ldf 
    go
    

    Replace DatabaseName with the name of the database and replace Path with the path to where you moved or restored the data files.

  5. Repeat steps 2 through 4 for each database, which can include the operations database (OperationsManager), the data warehouse database (OperationsManagerDW), and the WSUS database (SUSDB).

  6. Start the services that you stopped earlier, and then in a Command Prompt window, type the following command:

    IISReset /start
    

WSUSutil.exe is a tool that you can use to manage your WSUS server from the command line. WSUSutil.exe is located in the %drive%\Program Files\Update Services\Tools folder on the Management Server. You can run WSUSutil.exe to copy the update files from the old location to the new location and then update the WSUS database to refer to the new location of the update files.

To move the WSUS update files

  • Open a Command Prompt window and type the following command:

    wsusutil movecontent contentpathlogfile
    

    Change contentpath to the path of the new folder. Change logfile to the name of the log file where the status of the copy procedure will be recorded.

    For more information about moving files by using WSUSutil.exe, type the following command:

    wsusutil help movecontent
    

Moving data files for Forefront Security for Exchange Server

Forefront Security for Exchange Server stores program settings, scanning activity information, and quarantine area data. You can move these files at any time after you install Windows EBS.

The data files location can be found in the following registry location on the Messaging Server:

HKLM\SOFTWARE\Wow6432Node\Microsoft\Forefront Server Security\Exchange Server\DatabasePath

To move the data files for Forefront Security for Exchange Server

  1. On the Messaging Server, click Start, click Run, type services.msc, and then click OK.

  2. Stop the following services. (To stop a service, right-click the service, and then click Stop.)

    • FSCController

    • FSCMonitor

    • FSCStatisticsService

    • FSEIMC

    • FSEMailPickup

  3. Create a folder in the location where you want to restore the files from a backup or move the files.

  4. Move or restore all of the data files (files with the .fdb extension) and the Quarantine and Engines folders to the new folder.

  5. Click Start, click Run, type regedit, and then click OK.

  6. Locate and then click the following registry subkey:

    HKLM\SOFTWARE\Wow6432Node\Microsoft\Forefront Server Security\Exchange Server\DatabasePath
    
  7. Double-click the DatabasePath registry entry, and then in the Value text box, type the path of the new folder.

  8. Restart the services that you stopped in step 2.

Moving data files and mailbox databases for Exchange Server 2007

You can use the Move Storage Group Path Wizard to move the system and transaction log files for your storage group.

To move the system and transaction log files for Exchange Server 2007

  1. Open Exchange Management Console.

  2. In the left pane, expand Server Configuration, and then click Mailbox.

  3. In the center pane, click the name of your storage group, and then in the Actions pane, click Move Storage Group Path.

  4. Finish the Move Storage Group Path Wizard.

You can use the Move Database Path Wizard to move the mailbox databases.

To move the mailbox databases for Exchange Server 2007

  1. Open Exchange Management Console.

  2. In the left pane, expand Server Configuration, and then click Mailbox.

  3. In the center pane, expand your storage group, and then click Mailbox Database.

  4. In the Actions pane, click Move Database Path.

  5. Finish the Move Database Path Wizard.

Moving the Windows SharePoint Services database

By default, Windows SharePoint Services uses one database for configuration and another database for content. The Microsoft SQL Server Desktop Engine (MSDE) databases are located on the hard disk drive where the Windows operating system is installed (typically drive C).

To move the MSDE databases

  1. Locate the MSDE database files STS_Config.mdf and STS_<ServerName>_1.mdf, where ServerName is the name of your server that is hosting the content database. By default, these files are located in the following folder:

    C:\Program Files\Microsoft SQL Server\MSSQL$Sharepoint\Data
    
  2. Click Start, click Run, type cmd, and then press ENTER.

  3. Start the Osql.exe tool. To do this, at a command prompt, type osql -E -S <ServerName>\<InstanceName> (where ServerName is the name of the server where the MSDE database files are located, and where InstanceName is the name of the instance of MSDE), and then press ENTER.

    Note

    By default, the instance name is sharepoint.

  4. Back up the existing configuration and content databases. To do this, at a command prompt where the Osql.exe tool is running, type the following:

    BACKUP DATABASE <sharepoint> TO DISK = <PathName>
    

    Where sharepoint is the name of the MSDE database, and where PathName is the path and file name that you want, such as C:\MSDE\Backup\sharepoint.bak.

  5. Type GO, and then press ENTER.

  6. Repeat steps 4 and 5 for each database.

  7. Detach the configuration database. To do this, at the command prompt, type EXEC sp_detach_db ‘<Configurationdb>’ (where Configurationdb is the name of the MSDE configuration database), and then press ENTER. For example, type EXEC sp_detach_db ‘STS_Config’, and then press ENTER.

  8. Detach the content database. To do this, at a command prompt, type EXEC sp_detach_db ‘<Contentdb>’ (where Contentdb is the name of the MSDE content database), and then press ENTER. For example, type EXEC sp_detach_db ‘STS_ServerName_1', and then press ENTER.

    Note

    If you receive a message that the database is in use and cannot be detached, open a new Command Prompt window. At the new command prompt, type the following and press ENTER after each line:net pause mssql$sharepointnet continue mssql$sharepoint

  9. Open another Command Prompt window or start Windows Explorer, and then copy the MSDE database files that you located in step 1 to the new folder.

  10. Attach the configuration database. To do this, at the command prompt where the Osql.exe tool is running, type the following:

    EXEC sp_attach_db @dbname = N'STS_Config', @filename1 = N'C:\new_database_location\STS_Config.mdf', @filename2 = N'C:\<new_database_location>\STS_Config_log.ldf'
    

    Where new_database_location is the folder where you moved the configuration database files in step 9.

  11. Attach the content database. To do this, at a command prompt where the Osql.exe tool is running, type the following:

    EXEC sp_attach_db @dbname = N'STS_spssrvlc_1', @filename1 = N'C:\<new_database_location>\STS_ServerName_1.mdf', @filename2 = N'C:\<new_database_location>\STS_ServerName_1_log.ldf'
    

    Where new_database_location is the folder where you moved the content database files in step 9.

  12. At a command prompt, type quit, and then press ENTER to quit the Osql.exe tool.