2011-01-10 94 views
2

我使用以下腳本安裝/卸載解決方案SharePoint解決方案的部署 - SharePoint 2007中

Uninstall.bat

@echo off 

echo ***************************************************** 
echo Un-Installing <solution> - 
echo (C) <company>. All rights reserved. 
echo ***************************************************** 

set stsadm="%programfiles%\common files\microsoft shared\web server extensions\12\bin\stsadm.exe" 

echo Retracing solution.wsp 
%stsadm% -o retractsolution -name solution.wsp -immediate -allContentURLs 

%stsadm% -o execadmsvcjobs 

echo Wait till the solution retraction is completed (check the central administration) 
pause 

echo Deleting solution from the solution store 
%stsadm% -o deletesolution -name solution.wsp -override 

%stsadm% -o execadmsvcjobs 

echo - Restarting WSS Timer service 
net stop "windows sharepoint services timer" 
net start "windows sharepoint services timer" 

echo Uninstallation completed successfully 

echo. 
pause 

INSTALL.BAT

@echo off 
set STSADM="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" 

echo ***************************************************** 
echo Installing <solution> - 
echo (C) <company>. All rights reserved. 
echo ***************************************************** 

echo Adding solution.wsp to the solution store 
%STSADM% -o addsolution -filename solution.wsp 

echo Deploying solution 
%STSADM% -o deploysolution -name solution.wsp -force -immediate -allowGacDeployment -allContentURLs 

%STSADM% -o execadmsvcjobs 

echo Installation completed successfully 

IISRESET 

Restarting SharePoint Timer Service.. 

NET STOP SPTIMERV3 
NET START SPTIMERV3 

REM echo copying resources.. 
REM %STSADM% -o copyappbincontent 

echo. 
pause 

但部署後,install.bat卡在execadmsvcjobs。當我檢查TaskManager時,CPU使用率猛增至100%,STS​​ADM.EXE和OWSTIMER.EXE消耗大量內存。所以部署將永遠運行。

任何想法?

+0

什麼在你的情況 – 2011-01-10 18:32:03

+0

該解決方案http://stackoverflow.com/questions/4646646/feature-event-handler-called-multiple-times-for-farm-level-feature-sharepoint-2/4647028#4647028是服務器非常慢的問題和根本原因。我在特徵事件處理程序中使用了一個靜態變量,並防止被多次調用。 – NLV 2011-01-17 03:57:46

回答

2

這個工作是一個相當普遍的問題,不太可能與正在部署的實際WSP文件有問題。看看following resources

1

我會建議通過日誌bieng生成12蜂巢日誌文件夾,這將幫助你找到問題的原因。

當部署所需的任何資源缺失或停機以進行維護時,會出現此類問題。就像如果您的服務器場中有多個Web服務器,並且由於某些問題而導致任何服務器出現故障,並且您尚未從SharePoint場中分離它,則會嘗試查找該服務器,並且由於該服務器不可用而導致作業掛起。當您嘗試將其部署到所有Web應用程序並且Web應用程序不可用時,可能會發生同樣的情況。

殺死被連續運行,您可以採取的幫助下後 http://blog.hinshelwood.com/archive/2008/12/10/removing-a-dead-solution-deployment-from-moss-2007.aspx

相關問題