在我的上一篇Blog中,我介紹了如何 實現一個SiteCollection一個ContentDatabase 在今天的實踐中,我們遇到了一個新問題 當調用Create-SC-OwnCDB (自訂函數,參見上一篇Blog)建立SiteCollection時,一個空的SiteCollection被成功建立,並且資料存放在指定的ContentDatabase中,一切按照計划進行。但是當我調用Restore-SPSite企圖用之前的SiteCollection備份覆蓋新建立的空SiteCollection時,結果發生了意外:這個備份被恢複到了其他ContentDatabase中。查了一下Restore-SPSite命令的協助,發現有一個-ContentDatabase參數,參數說明如下:Specifies the SQL Server content database where the site collection data will be stored. If no content database is specified, the content database with the
greatest unused site collection capacity and whose database status is ready will be used. 個人認為這種預設設定不合理,我覺得預設應該使用被覆蓋的SiteCollection所在的ContentDatabase,而不是當前可用的具有最大SiteCollection可用數量(MaxSiteCount - CurrentSiteCount)的那個ContentDatabase。 最後的解決辦法是用Move-SPSite將那個SiteCollection移動到我們期望的ContentDatabase中:Move-SPSite -Identity http://mysharepointsite.com.au/sites/user -destinationdatabase WSS-Content-NewUserDB 這個命令提示需要重啟IIS,於是在每台FEW伺服器中執行IISRESET命令。 有誰知道簡單的方式實現自動重啟所有的FEW中的IIS? 望不吝賜教!通過 Wiz 發布