Move-SPBlobStorageLocation

使用遠端 Blob 儲存 (RBS) 將內容資料庫複製到新位置。

Syntax

Move-SPBlobStorageLocation
    [-SourceDatabase] <String>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-Confirm]
    [-DestinationDatabase <String>]
    [-DestinationDataSourceInstance <String>]
    [-Dir <String>]
    [-VerboseMod <Boolean>]
    [-WhatIf]
    [<CommonParameters>]

Description

Use the Move-SPBlobStorageLocation cmdlet to use Remote BLOB Storage (RBS) to copy a content database to an instance of a SQL Server database. The database size limitation for SQL Server is 4 gigabytes (GB). If a content database is greater than 4 GB, the database cannot be copied directly to a SQL Server database instance. The Move-SPBlobStorageLocation cmdlet uses the advantage of RBS and copies databases larger than 4 GB. RBS stores the data on the local hard disk and keeps the links to the data in the database, which results in a smaller database.

如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱位於 SharePoint Server Cmdlets 的線上文件。

範例

-------------------範例 1-----------------------

Move-SPBlobStorageLocation WSS_Content

此範例會使用 RBS 從 Windows 內部資料庫將名為 WSS_Content 的內容資料庫複製到 SQL Server 2008 Express 中的相同資料庫名稱。

-------------------範例 2-----------------------

Move-SPBlobStorageLocation WSS_Content -DestinationDatabase WSS_V4_Content -BackupDatabase WSSBackupDB -VerboseMod:$true

This example copies the content database named WSS_Content from the Windows Internal Database to a database in SQL Server 2008 Express. The name of the new database will be WSS_V4_Content. During the move, the backup file name will be WSSBackupDB. The output of this command displays log information to the Command Prompt window.

參數

-AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Confirm

在執行命令之前,提示您確認操作。 如需詳細資訊,請輸入下列命令:get-help about_commonparameters

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-DestinationDatabase

Specifies the name of the migrated database. If the DestinationDatabase parameter is not specified, the SourceDatabase parameter is used.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-DestinationDataSourceInstance

Specifies the name of the instance of the destination database. The value in the SourceDatabase parameter is migrated to this instance. The name of the instance of the database should be SQL Server with Service Pack 1 (SP1) and Cumulative Update 2 version or higher. If the DestinationDataSourceInstance parameter is not specified, the local host name is used.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Dir

Used for all disk operations, including storing temporary backups and database (.mdf) files of a migrated database. If the Dir parameter is not specified, a default directory of the destination SQL Server instance is used. The free space in this directory should be at least two times the size of the source database.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-SourceDatabase

指定 Windows 內部資料庫的名稱。

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-VerboseMod

Generates verbose log output to be displayed in the Command Prompt window. If the VerboseMod parameter is not specified, no output is displayed.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition