日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

SharePoint 数据库管理-PowerShell

發布時間:2024/9/5 数据库 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SharePoint 数据库管理-PowerShell 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1. 顯示所有SharePoint數據庫

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

轉載于:https://www.cnblogs.com/justinliu/p/5961724.html

總結

以上是生活随笔為你收集整理的SharePoint 数据库管理-PowerShell的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。