Attach and restore a read-only content database (Search Server 2010)
Применимо к: Search Server 2010
Последнее изменение раздела: 2010-02-18
Информация, содержащаяся в этом разделе, не относятся к серверу Microsoft Search Server 2010 Express. Данные сведения касаются только полной версии сервера Microsoft Search Server 2010.
A Microsoft Search Server 2010 farm in which content databases have been set to be read-only can be part of a failure recovery environment that runs against mirrored or log-shipped content databases or part of a highly available maintenance or patching environment that provides user access when another version of the farm is being updated. When you re-attach the read-only databases, they become read-write.
Use Windows PowerShell to attach and restore a read-only content database
You can only use Windows PowerShell to attach and restore a read-only content database.
To attach and restore a read-only content database by using Windows PowerShell
Verify that you meet the following minimum requirements: См. статью Add-SPShellAdmin.
On the Start menu, click All Programs.
Click SharePoint 2010 Products.
Click SharePoint 2010 Management Shell.
At the Windows PowerShell command prompt, type the following command:
Mount-SPContentDatabase -Name <DatabaseName> -WebApplication <WebApplicationID> -Verbose
Where:
<DatabaseName> is the name of the content database that you want to attach.
<WebApplicationID> is the identity of the Web application to which you want to associate the content database.
If you do not use the Verbose parameter, the Command Prompt window displays no message if the operation succeeds. If the operation does not finish successfully, the Command Prompt window displays an error message such as the following:
Mount-SPContentDatabase : <context-specific error message>. At line: <line> char:<column>. + <cmdlet> <<<< <location of error>
Примечание
Attaching a content database by using the Mount-SPContentDatabase cmdlet differs from attaching a database in SQL Server by using SQL Server tools. Mount-SPContentDatabase associates the content database with a Web application so that the contents can be read.
For more information, see Mount-SPContentDatabase.
Примечание
Для выполнения административных задач из командной строки мы рекомендуем использовать Windows PowerShell. Программа командной строки Stsadm является устаревшей, однако она добавлена для совместимости с предыдущими версиями продукта.