Move content databases between instances of SQL Server (Search Server 2008)
You can move content databases between instances of Microsoft SQL Server 2005, from any server running Microsoft Search Server 2008 to any server running Search Server 2008, or from one Search Server 2008 Web application to another.
Wichtig
This article covers moving content databases only and does not provide information about moving other databases that are associated with Search Server 2008.
Wichtig
Wenn Sie eine Inhaltsdatenbank trennen und erneut anfügen, sollten Sie sich darauf einstellen, dass beim nächsten Crawling des Inhalts der Inhaltsdatenbank ein vollständiger Crawl ausgeführt wird, auch wenn ein inkrementeller Crawl angefordert wurde. Vollständige Crawls können erheblich mehr Zeit in Anspruch nehmen als inkrementelle Crawls, da bei vollständigen Crawls ein erneutes Crawling des vom Crawler festgestellten Inhalts stattfindet. Dies findet unabhängig davon statt, ob im Vorfeld bereits ein Crawling des Inhalts stattgefunden hat.
If you are running the Infrastrukturaktualisierung für Microsoft Office Server, the identifier (ID) of each content database is retained when you restore or reattach the database by using built-in tools. Default change log retention behavior when using built-in tools is as follows:
The change logs for all databases are retained when you restore a farm.
The change log for a content database is retained when you reattach the database.
The change log for a content database is NOT retained when you restore just the content database.
When a database ID and change log are retained, Search continues crawling based on the regular schedule defined by crawl rules. When a change log is not retained, Search performs a full crawl during the next scheduled crawl.
For more information, see Move all databases (Search Server 2008) and Protecting and restoring the farm (Search Server 2008).
Move content databases between instances of SQL Server
In the move process, you will use Search Server 2008 tools and SQL Server 2005 tools. You can use either the SharePoint Central Administration Web site or the Stsadm command-line tool. The following procedures document the steps for both tools. The process involves the following phases:
Using Search Server 2008 tools, remove the content database from the Search Server 2008 Web application. Removing the content database does not delete the database but only removes the association of the database with the Web application. This task is analogous to detaching a database in SQL Server in that the content of the database remains intact.
Tipp
Record the exact name of the content database. If you are moving or copying several content databases from more than one Web application, record which content databases are associated with each Web application.
By using SQL Server 2005 tools, detach the database from the source instance.
Copy or move the .mdf and .ldf files from the source directory to the destination directory.
By using SQL Server 2005 tools, reattach the database to the destination instance.
By using Search Server 2008 tools, add the content database to the destination Search Server 2008 Web application. Be sure that you use the exact same name to reattach the content database. Otherwise, Search Server 2008 will create a new database.
By using Search Server 2008 tools, perform a full crawl of the newly reattached content database.
Wichtig
Membership in the Administrators group on the local computers is required to complete this procedure. You must have at least the following roles in SQL Server 2005:
The dbowner fixed database role for the database on the source running SQL Server 2005 or instance of SQL Server, to detach the database.
If you are moving the databases from one farm to another farm, you must make the database access account a member of the Administrators group on the database server during the restore process. This is required for the account to replicate the security setting for the databases. This access level can be removed after the restore process is complete.
The dbcreater fixed server role on the destination server running SQL Server 2005 or instance of SQL Server, to attach the database.
Tipp
Record the exact name of the content database. If you are moving or copying several content databases from more than one Web application, record which content database is associated with each Web application.
Move content databases between instances of SQL Server by using Central Administration
In Central Administration, on the Application Management page, in the SharePoint Web Application Management section, click Content databases.
On the Manage Content Databases page, click the content database you want to move.
Tipp
If the content database does not appear, it might be associated with another Web application. To select another Web application, on the Web Application menu, click Change Web Application.
On the Manage Content Database Settings page, in the Remove Content Database section, select the Remove content database check box, and then click OK.
Tipp
Removing the content database does not delete the database; it only removes the association of the database with the Web application.
Repeat steps 2 and 3 for each content database that you want to move.
In SQL Server 2005 Management Studio, open the source instance of SQL Server, and then expand the Databases node.
Right-click the content database, point to Tasks, and then click Detach. Repeat this step for each content database that you want to move.]
Tipp
Use this procedure to move only content databases. Do not detach any other databases.
In Windows Explorer, browse to the location of the .mdf and .ldf files for the content databases.
Select the .mdf and .ldf files for the database you want to move and either copy or move them to the destination directory.
In SQL Server 2005 Management Studio, open the destination instance of SQL Server.
Right-click the Databases node, point to Tasks, and then click Attach.
In the Attach Database dialog box, browse to the location to which you transferred the .mdf and .ldf files, select the .mdf file for the database you want to attach and click OK.
Repeat steps 10 and 11 for each content database that you are moving.
In Central Administration, on the Application Management page, in the SharePoint Web Application Management section, click Content databases.
On the Manage Content Databases page, click Add a content database.
On the Add Content Database page, verify that the Web Application menu displays the correct Web application.
In the Database Name box, type the exact name of the transferred content database, and then click OK.
Repeat steps 15 and 16 for each database you are adding. Be sure that you select the correct Web application from the Web Application menu for each database.
Start a full crawl of each of the transferred content databases. For more information about starting a full-crawl, see Starten eines vollständigen Crawls (Office SharePoint Server 2007).
Move content databases between instances of SQL Server by using the Stsadm command-line tool
On the drive where SharePoint Products and Technologies is installed, change to the following directory where the Stsadm command-line tool is located: %COMMONPROGRAMFILES%\Microsoft Shared\Web server extensions\12\Bin.
Type the following command, and then press ENTER:
stsadm -o preparetomove –contentdb <content database name>
To determine the database name, use the enumcontentdbs operation.
For more information about the preparetomove operation, see Preparetomove: Stsadm-Vorgang (Office SharePoint Server).
Type the following command, and then press ENTER:
stsadm -o deletecontentdb -url <URL name> -databasename <database name> -[databaseserver <database server name>]
For more information about the deletecontentdb operation, see Deletecontentdb: Stsadm-Vorgang (Office SharePoint Server).
Tipp
You must perform this operation for each content database you want to move. Removing the content database does not delete the database. The operation only removes the association of the database with the Web application.
In SQL Server 2005 Management Studio, open the source instance of SQL Server, and then expand the Databases node.
Right-click the content database that you want to detach, point to Tasks, and then click Detach. Repeat for each content database that you want to move.
Tipp
You can use this procedure to move content databases only. Do not detach any other databases.
In Windows Explorer, browse to the location of the .mdf and .ldf files for the content databases.
Select the files, and then either copy or move them to the destination directory.
In SQL Server 2005 Management Studio, open the destination instance of SQL Server.
Right-click the Databases node, point to Tasks, and then select Attach.
In the Attach Database dialog box, browse to the location to which you transferred the .mdf and .ldf files, select the .mdf file for the database you want to attach, and then click OK.
Repeat steps 8 and 9 for each content database you are moving.
On the drive where SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin
Type the following command, and then press ENTER:
stsadm -o addcontentdb -url <URL name> -databasename <database name> [-databaseserver <database server name>] [-databaseuser <database user name>] [-databasepassword <database password>] [-sitewarning <site warning count>] [-sitemax <site max count>]
For more information about the addcontentdb operation, see Addcontentdb: Stsadm-Vorgang (Windows SharePoint Services).
Tipp
You must perform this operation for each content database you want to move. You can create a batch script to do this.
Start a full crawl of each of the transferred content databases. For more information about starting a full-crawl, see Starten eines vollständigen Crawls (Office SharePoint Server 2007).
Siehe auch
Konzepte
Move content databases (Search Server 2008)
Move content database from Windows Internal Database or SQL Server Express Edition to an instance of SQL Server (Search Server 2008)