SharePoint 数据库管理-PowerShell
2013-06-28 21:35
162 查看
1. 显示所有SharePoint数据库
2. 获取指定的数据库
3. 创建一个新的内容数据库
4. 显示一个Web应用程序下所有的数据库
5. 从一个Web应用程序移除一个数据库
6. 附加一个数据库到Web应用程序
7. 删除一个内容数据库
8. 创建配置数据库
9. 删除配置数据库
10. 备份配置数据库
或
Full为完全备份,也可以使用Differential增量备份
11. 恢复配置数据库
12. 备份SharePoint场
使用-ShowTree参数显示场中所有可备份的项目;使用-Item参数备份指定的项目
13. 恢复SharePoint场
使用-Item参数恢复指定的项目
14. 备份网站集
15. 还原网站集
Get-SPDatabase –ServerInstance "SP2010\SQLSharePoint"
2. 获取指定的数据库
$database = Get-SPDatabase -Identity 47036154-7a05-44be-9137-9be09f43ccb5
3. 创建一个新的内容数据库
New-SPContentDatabase –Name NewContentDB –WebApplication "PSWebApp"
4. 显示一个Web应用程序下所有的数据库
Get-SPContentDatabase –WebApplication "PSWebApp"
5. 从一个Web应用程序移除一个数据库
$database = Get-SPContentDatabase -Identity 025b1239-cd62-451e-943d-dff2e0d52ec8 Dismount-SPContentDatabase $database
6. 附加一个数据库到Web应用程序
Mount-SPContentDatabase –Name "NewContentDB" –WebApplication "PSWebApp"
7. 删除一个内容数据库
$database = Get-SPContentDatabase -Identity 025b1239-cd62-451e-943d-dff2e0d52ec8 Remove-SPContentDatabase $database
8. 创建配置数据库
New-SPConfigurationDatabase –DatabaseName NewConfigurationDB –DatabaseServer "SP2010\SQLSharePoint"
9. 删除配置数据库
Remove-SPConfigurationDatabase
10. 备份配置数据库
Backup-SPConfigurationDatabase –Directory F:\Backups
或
Backup-SPFarm –BackupMethod Full –Directory F:\Backups -ConfigurationOnly
Full为完全备份,也可以使用Differential增量备份
11. 恢复配置数据库
Restore-SPFarm –Directory F:\Backups –ConfigurationOnly –RestoreMethod Overwrite
12. 备份SharePoint场
Backup-SPFarm –BackupMethod Full –Directory F:\Backups
使用-ShowTree参数显示场中所有可备份的项目;使用-Item参数备份指定的项目
13. 恢复SharePoint场
Restore-SPFarm –Directory F:\Backups –RestoreMethod Overwrite
使用-Item参数恢复指定的项目
14. 备份网站集
Backup-SPSite –Identity "http://sp2010/sites/BICenter" –Path F:\Backups\BICenter.bak
15. 还原网站集
Restore-SPSite –Identity "http://sp2010/sites/BICenter" –Path F:\Backups\BICenter.bak –Force
相关文章推荐
- SharePoint 2010 PowerShell(4)使用PowerShell管理文档库
- SharePoint 2010 PowerShell(3)使用PowerShell管理列表
- SharePoint 2010 PowerShell 系列 之 文档管理 初级应用
- SharePoint 2010 PowerShell(2)使用PowerShell管理网站
- SharePoint 2010 PowerShell(4)使用PowerShell管理文档库
- SharePoint 2010 PowerShell(3)使用PowerShell管理列表
- SharePoint 2010 PowerShell(4)使用PowerShell管理文档库
- sharepoint 2016 场快速配置(5)——管理内容数据库
- 数据库管理——Powershell——使用Powershell脚本找出消耗最多磁盘空间的文件
- [ InfoPath应用场景:库存管理 ] 在InfoPath Form Service利用WSS Web Service技术,通过VSTA代码把复杂表单写入SharePoint列表数据库 (二)
- 管理Windows内部数据库(MICROSOFT##SSEE)实例 sharepoint
- SharePoint 2010 PowerShell(2)使用PowerShell管理网站
- SharePoint 网站管理-PowerShell
- 数据库管理——Powershell——使用Powershell脚本找出消耗最多磁盘空间的文件
- SharePoint 2010 PowerShell(3)使用PowerShell管理列表
- [转载]SharePoint 网站管理-PowerShell
- 数据库管理——Powershell——使用Powershell脚本找出消耗最多磁盘空间的文件
- SharePoint 2010 PowerShell(4)使用PowerShell管理文档库
- 【InfoPath应用场景:库存管理】在InfoPath Form Service利用WSS Web Service技术,通过VSTA代码把复杂表单写入SharePoint列表数据库的后继
- SharePoint 2010 PowerShell(2)使用PowerShell管理网站