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

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > 数据库 >内容正文

数据库

SharePoint 数据库管理-PowerShell

發(fā)布時(shí)間:2024/9/5 数据库 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SharePoint 数据库管理-PowerShell 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1. 顯示所有SharePoint數(shù)據(jù)庫(kù)

Get-SPDatabase –ServerInstance "SP2010\SQLSharePoint"

2. 獲取指定的數(shù)據(jù)庫(kù)

$database = Get-SPDatabase -Identity 47036154-7a05-44be-9137-9be09f43ccb5

3. 創(chuàng)建一個(gè)新的內(nèi)容數(shù)據(jù)庫(kù)

New-SPContentDatabase –Name NewContentDB –WebApplication "PSWebApp"

4. 顯示一個(gè)Web應(yīng)用程序下所有的數(shù)據(jù)庫(kù)

Get-SPContentDatabase –WebApplication "PSWebApp"

5. 從一個(gè)Web應(yīng)用程序移除一個(gè)數(shù)據(jù)庫(kù)

$database = Get-SPContentDatabase -Identity 025b1239-cd62-451e-943d-dff2e0d52ec8 Dismount-SPContentDatabase $database

6. 附加一個(gè)數(shù)據(jù)庫(kù)到Web應(yīng)用程序

Mount-SPContentDatabase –Name "NewContentDB" –WebApplication "PSWebApp"

7. 刪除一個(gè)內(nèi)容數(shù)據(jù)庫(kù)

$database = Get-SPContentDatabase -Identity 025b1239-cd62-451e-943d-dff2e0d52ec8 Remove-SPContentDatabase $database

8. 創(chuàng)建配置數(shù)據(jù)庫(kù)

New-SPConfigurationDatabase –DatabaseName NewConfigurationDB –DatabaseServer "SP2010\SQLSharePoint"

9. 刪除配置數(shù)據(jù)庫(kù)

Remove-SPConfigurationDatabase

10. 備份配置數(shù)據(jù)庫(kù)

Backup-SPConfigurationDatabase –Directory F:\Backups

Backup-SPFarm –BackupMethod Full –Directory F:\Backups -ConfigurationOnly

Full為完全備份,也可以使用Differential增量備份

11. 恢復(fù)配置數(shù)據(jù)庫(kù)

Restore-SPFarm –Directory F:\Backups –ConfigurationOnly –RestoreMethod Overwrite

12. 備份SharePoint場(chǎng)

Backup-SPFarm –BackupMethod Full –Directory F:\Backups

使用-ShowTree參數(shù)顯示場(chǎng)中所有可備份的項(xiàng)目;使用-Item參數(shù)備份指定的項(xiàng)目

13. 恢復(fù)SharePoint場(chǎng)

Restore-SPFarm –Directory F:\Backups –RestoreMethod Overwrite

使用-Item參數(shù)恢復(fù)指定的項(xiàng)目

14. 備份網(wǎng)站集

Backup-SPSite –Identity "http://sp2010/sites/BICenter" –Path F:\Backups\BICenter.bak

15. 還原網(wǎng)站集

Restore-SPSite –Identity "http://sp2010/sites/BICenter" –Path F:\Backups\BICenter.bak –Force

轉(zhuǎn)載于:https://www.cnblogs.com/justinliu/p/5961724.html

總結(jié)

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

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。