Proper stsadm commands to update SharePoint Solution/Feature

左心房为你撑大大i 提交于 2019-12-09 12:41:10

问题


What are the proper stsadm commands in sequence to force an upgrade to a SharePoint solution. I have tried

C:>"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "MySolution.wsp" -immediate -allcontenturls -allowGacDeployment -allowCasPolicies -force

followed by

C:>"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs

It seems to deploy and shows the solution as having a deployment time of when I push these commands but my files don't appear to get updated and new files don't appear.

Am I missing something? Do I need to do an IISReset /noforce after processing these commands.

Thanks, Josh Lewis


回答1:


The proper way is to use the -o upgradesolution command. In most cases there is no need to retract and delete the solution and reinstall it. Be sure and follow it up with an -o execadmsvcjobs as usual.




回答2:


stsadm -o retractsolution -name ... -immediate -allcontenturls
stsadm -o execadmsvcjobs
stsadm -o deletesolution -name ...
stsadm -o addsolution -filename ... 
stsadm -o deploysolution -name ... -immediate -allcontenturls -allowgacdeployment -allowcaspolicies
stsadm -o execadmsvcjobs

A few warnings:

Sometimes you have to start with deactivating the feature first (stsadm -o deactivatefeature). When I changed a Site feature containing a list template to a Web feature I ended up with double links on the create page. So i had to install the old feature again, deactivate it and then reinstall the new feature.

Do NOT use -force if you're not sure what you are doing. If you use it with the -o deletesolution command you may end up with old versions of files on some or all of your servers. Such problems can be hard to track down and it gives you a lot of extra work, especially if you have multiple front end servers.




回答3:


  1. Ghosted files don't get updated.

  2. stsadm -o execadmsvcjobs will proces any job, that is late on processing

  3. reactivate features, Those that contain content (next time; use feature stapling!)

  4. upgrading solutions will not always automatically install new features (yes, install, not activate). Check this.




回答4:


An IISRESET might also be worthwhile but you could try to run the "SharePoint Products and Technologies Configuration Wizard", AKA PSCONFIG.EXE

Located at C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\BIN

It'll syncronize the informations that are on the Database, the IIS and the Binaries. It's necessary to run it when you apply a Service Pack.

Also make sure that all servers on your farm has access to the Central Administration and that you ran the PSCONFIG on all of them.




回答5:


I think because you are supplying the -force parameter in the deploysolution command you are actually suppressing the error message that would probably be displayed - along the lines of Solution already exists. As stated previously either do retract->deploy or upgrade (depending on your scenario).



来源:https://stackoverflow.com/questions/748261/proper-stsadm-commands-to-update-sharepoint-solution-feature

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!