Move-SPBlobStorageLocation
使用远程 BLOB 存储 (RBS) 将内容数据库复制到新位置。
语法
Default (默认值)
Move-SPBlobStorageLocation
[-SourceDatabase] <String>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-DestinationDatabase <String>]
[-DestinationDataSourceInstance <String>]
[-Dir <String>]
[-VerboseMod <Boolean>]
[-WhatIf]
[<CommonParameters>]
说明
使用 Move-SPBlobStorageLocation cmdlet 使用远程 BLOB 存储 (RBS) 将内容数据库复制到SQL Server数据库的实例。 SQL Server的数据库大小限制为 4 GB (GB) 。 如果内容数据库大于 4 GB,则无法将数据库直接复制到SQL Server数据库实例。 Move-SPBlobStorageLocation cmdlet 利用了 RBS 的优点,可复制 4 GB 以上的数据库。 RBS 将数据存储到本地硬盘中,并保存指向数据库中的数据的链接,这将生成较小的数据库。
有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet。
示例
示例 1
Move-SPBlobStorageLocation WSS_Content
此示例使用 RBS 将名为 WSS_Content 的内容数据库从 Windows 内部数据库 复制到 SQL Server 2008 Express 中的同一数据库名称。
示例 2
Move-SPBlobStorageLocation WSS_Content -DestinationDatabase WSS_V4_Content -BackupDatabase WSSBackupDB -VerboseMod:$true
此示例将名为 WSS_Content 的内容数据库从 Windows Internal Database 复制到 SQL Server 2008 Express 中的数据库中。 新数据库的名称将为 WSS_V4_Content。 移动期间,备份文件名将为 WSSBackupDB。 此命令输出在命令提示符窗口中显示日志信息。
参数
-AssignmentCollection
适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019
管理对象以便正确进行处理。 使用 SPWeb 或 SPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。 通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。 在使用 SPWeb、SPSite 或 SPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。
在使用 Global 参数时,所有对象均包含在全局存储中。 如果未立即使用对象,或未通过使用 Stop-SPAssignment 命令来处理对象,则可能会发生内存不足的情况。
参数属性
| 类型: | SPAssignmentCollection |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Confirm
适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019
执行命令前,看到确认提示。
有关详细信息,请键入以下命令:get-help about_commonparameters
参数属性
| 类型: | SwitchParameter |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | cf |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DestinationDatabase
适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019
指定迁移的数据库的名称。 如果未指定 DestinationDatabase 参数,则使用 SourceDatabase 参数。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DestinationDataSourceInstance
适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019
指定目标数据库实例的名称。 SourceDatabase 参数中的值将迁移至此实例。 数据库实例的名称应SQL Server Service Pack 1 (SP1) 和累积更新 2 版本或更高版本。 如果未指定 DestinationDataSourceInstance 参数,则使用本地主机名。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Dir
适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019
用于所有磁盘操作,包括用于存储迁移数据库的临时备份和数据库 (.mdf) 文件。 如果未指定 Dir 参数,则使用目标 SQL Server 实例的默认目录。 此目录中的可用空间应至少为源数据库大小的两倍。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-SourceDatabase
适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019
指定 Windows Internal Database 的名称。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 1 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-VerboseMod
适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019
生成要在命令提示符窗口中显示的详细日志输出。 如果未指定 VerboseMod 参数,则不会显示任何输出。
参数属性
| 类型: | Boolean |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-WhatIf
适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019
显示一条描述命令作用的消息,而不执行命令。
有关详细信息,请键入以下命令:get-help about_commonparameters
参数属性
| 类型: | SwitchParameter |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | 无线 |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。