Export (0) Print
Expand All
ABS
AND
ASC
COS
DAY
DDB
EXP
FV
IF
INT
LEN
LN
LOG
MAX
Me
MID
MIN
MOD
NOT
IS
NPV
ODD
OR
PI
PMT
PV
SIN
SLN
SUM
SYD
T
TAN
VAR
Expand Minimize

Moving the Databases

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Use the procedures in this section to move the databases thatsupport Windows SharePoint Services to another drive on your servercomputer or to a separate server running Microsoft SQL Server2000.

Moving the Databases to a Different Hard Disk Drive on the SameServer

This procedure guides you through taking eachdatabase offline, detaching it, moving it to a differentdrive on the same server, reattaching it, and restartingit.

Move databases to a different hard disk drive

  1. Stop the Web server by typing the following at the commandprompt:

    iisreset /stop
    
  2. Stop the SharePoint Timer Service by typing the following atthe command prompt:

    net stop sptimer
    
  3. At the command prompt, launch the OSQL command line utility bytyping the following:

    osql E S %computername%\SharePoint
    
  4. To detach each database, type the following, pressing ENTERafter each line:

    EXEC sp_detach_db "Database_Name", "true" GO
    

    The prompt will increment in value as you enter eachcommand.

    Note: This step must be followed once for your configuration database and once for eachcontent database.

  5. By using Windows Explorer, move each database to its newlocation. For each database, move the database (.mdf) file and thetransaction log (.ldf) file.

  6. In the command window running the OSQL utility, reattach eachdatabase using the new location for the files, by typing thefollowing:

    EXEC sp_attach_db 'Database_Name', 'd:\New_Location\Database_Name.mdf', 'd:\New_Location\Database_Name_log.LDF'GO
    

    Note: These steps must be followedonce for your configuration database and once for each contentdatabase.

  7. Exit the OSQL utility by pressing CTRL+C.

  8. Restart the SharePoint Timer Service by typing the following atthe command prompt:

    net start sptimer
    
  9. Restart the Web server by typing the following at the commandprompt:

    iisreset /start
    

Moving the Databases to a Database Server Running Microsoft SQLServer 2000

The procedures in this section guide youthrough moving your database files from the default location to aseparate server, reattaching them, and updating theconfiguration database to point to the new location. Beforestarting, choose or create a domain account to use to connect tothe SQL Server 2000 databases after they are moved to the newserver. To help protect security, give this account the minimumprivileges that will support it having the database owner (dbo)role on the SQL Server database. For details, see the Microsoft SQLServer 2000 documentation.

Note: In the following procedure, theserver from which you are moving the database files is called thesource server and the server to which you are moving the files iscalled the destination server.

Move the databases

  1. On the source server, stop the Web server by typing thefollowing at the command prompt:

    iisreset /stop
    
  2. On the source server, stop the SharePoint Timer Service bytyping the following at the command prompt:

    net stop sptimer
    
  3. On the source server, stop the WMSDE database server by typingthe following at the command prompt:

    net stop mssql$sharepoint
    
  4. By using Windows Explorer, move each database to the newlocation on the destination server.

    Note: This step must be followed once for your configuration database and once for eachcontent database. For each database, move the database (.mdf) fileand the transaction log (.ldf) file.

Attach the databases

  1. On the destination server, at a Windows command prompt, launchthe OSQL command line utility by typing the following:

    
    
    osql E S %computername% 
    

    Note: If you specified aninstance name when installing SQL Server, append it to%computername% as follows:

     
    

    osql E S %computername%\Instance_Name
    
  2. In the command window running OSQL, attach each database usingthe new location for the files by typing the following and pressingENTER after each line:

    EXEC sp_attach_db 'Database_Name', 'd:\New_Location\Database_Name.mdf', 'd:\New_Location\Database_Name,_log.LDF'GO
    

    Note: This step must be followed once for your configuration database and once for eachcontent database.

  3. Exit the OSQL utility by pressing CTRL+C.

Assign a domain account under which the databases will run

  1. On the source server, click Start , point to AllPrograms , point to Administrative Tools , and then click Internet Information Services (IIS) Manager .

  2. In Internet Information Services (IIS) Manager , expandthe local computer and expand the Application Pools folder.

    All application pools for the server are listed. Bydefault, the application pools STSAdminAppPool and STSAppPool1 areassociated with Windows SharePoint Services virtual servers. If youhave created other application pools for virtual servers, they willbe listed here.

  3. For each application pool associated with a virtual server, dothe following:

    1. Right click the application pool, and then click Properties .

    2. On the Identity tab, click Configurable .

    3. In the User name field, enter the domain account underwhich the databases will run on the destination server. This sameaccount must have database owner (dbo) privileges in the SQL Serverdatabase.

      Note: You can reset the defaultaccount and password by clicking Predefined .

    4. In the Password field, enter the password for the domainaccount, and then click OK .

  4. On the source server, add the domain account to the IIS_WPG and STS_WPG local groups .

Set the configuration database in Windows SharePointServices

  1. On the source server, in Internet Information (IIS) Services Manager , expand the local computer, expand Web Sites ,right-click the SharePoint Central Administration Web site, andclick Start .

  2. Open the SharePoint Central Administration Pages.

    On the Start menu, point to All Programs , click Administrative Tools , and then click SharePoint Central Administration .

  3. In the Server Configuration section, click Set configuration database server .

  4. On the Set Configuration Database page, in the Database server field, enter the name of the destination server.

  5. On the Set Configuration Database page, click Connect to existing configuration database , and click OK .

  6. On the Central Administration page, in the Server Configuration section, click Set default content database server .

  7. On the Set Default Content Database Server page, in the Database server field, enter the name of the destinationserver, and then click OK .

Set the content database in Windows SharePoint Services

  1. On the Central Administration page, under Virtual Server Configuration , click Configure virtual server settings .

  2. Click the link for the virtual server containing the databasesthat you are moving.

  3. On the Virtual Server Settings page, under Virtual Server Management , click Manage content databases .

  4. For each content database listed under Content Databases , do the following:

    1. Click the database link.

    2. On the Manage Content Database Settings page, note the databasename as displayed in the SQL Server database name field.

    3. On the Manage Content Database Settings page, note the databasecapacity settings, as displayed in the Number of sites before a warning message is generated and the Maximum number of sites that can be created in this database fields. You willneed this information when adding the databases to the destinationserver.

    4. Disconnect the database from the source server by selecting the Remove content database check box, and then click OK .

  5. Attach each content database to the destination server. Foreach content database listed under Content Databases , do thefollowing:

    1. Click Add a content database .

    2. In the Database Name field, type the name of the contentdatabase.

    3. In the Number of sites before a warning message is generated and the Maximum number of sites that can be created in this database fields, enter the capacity settingsinformation you saved for the content database, and click OK .

  6. If you are moving databases for more than one virtual server,repeat steps 2 through 5 for each additional virtual server.

  7. On the source server, restart the SharePoint Timer Service bytyping the following at the command prompt:

    net start sptimer
    
  8. On the source server, restart the Web server by typing thefollowing at the command prompt:

    iisreset /start
    

Conclusion

By following the steps in this document, you have learned how tolocate the databases on a server running Microsoft WindowsSharePoint Services and move them to a different drive on the sameserver or to a separate server running Microsoft SQL Server 2000.After you have moved the databases and restarted IIS, test thedatabases in their new locations by browsing to your Web sites andviewing pages, document libraries, and lists.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft