Attach and restore a read-only content database (SharePoint Foundation 2010)
Aplica-se a: SharePoint Foundation 2010
Tópico modificado em: 2016-11-30
A Microsoft SharePoint Foundation 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.
For more information about how to use read-only databases, see Run a farm that uses read-only databases (SharePoint Foundation 2010).
Use Windows PowerShell to attach and restore a read-only content database
You can use only 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: Consulte Add-SPShellAdmin.
On the Start menu, click All Programs.
Click Microsoft SharePoint 2010 Products.
Click SharePoint 2010 Management Shell.
At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:
Mount-SPContentDatabase -Name <Database name> -WebApplication <Web application ID> [-Verbose]
Observação
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.
Observação
Recomendamos que você use o Windows PowerShell ao executar tarefas administrativas de linha de comando. A ferramenta de linha de comando Stsadm está obsoleta, mas está incluída para oferecer suporte à compatibilidade com versões anteriores do produto.
See Also
Concepts
Recovery (SharePoint Foundation 2010)
Other Resources
Resource Center: Business Continuity Management for SharePoint Foundation 2010