Sharepoint MOSS stsadm 常用命令汇总

备份还原网站 
 stsadm -o backup -url http://spweb/sites/fdp -filename C:\fdp_0216.bak -overwrite
 stsadm -o restore -url http://spweb/sites/fdp -filename D:\BACKUP\fdp_0216.bak -overwrite
 
导入导出备份 
 stsadm -o import -url http://portalsuat/smspindia/bi -filename c:\smspindia-bi.cab -includeusersecurity  -haltonfatalerror
 stsadm -o export -url http://simoss/sites/gns/circuits -filename d:\backups\GNSCircuit\gnscircuit20090207.bak -includeusersecurity  -haltonfatalerror
 
添加删除数据库 
 stsadm -o preparetomove -contentdb SIMOSSSHOWSQL01:WSS_Content_SIDEVVM02 -site http://sidevvm02
 stsadm -o deletecontentdb -url http://sidevvm02 -databasename WSS_Content_SIDEVVM02
 stsadm -o addcontentdb -url http://sidevvm02 -databasename WSS_Content_SIDEVVM02
 
命令行修改密码 
 cd %commonprogramfiles%\Microsoft Shared\Web server extensions\12\Bin
 stsadm -o updatefarmcredentials -userlogin REDMOND\sicfgact -password Feb19Upd@t
 iisreset /noforce
 stsadm -o updateaccountpassword -userlogin REDMOND\sicfgact -password Feb19Upd@t -noadmin
 stsadm.exe -o spsearch -farmserviceaccount REDMOND\sicfgact -farmservicepassword Feb19Upd@t
 stsadm.exe -o spsearch -farmcontentaccessaccount REDMOND\sicfgact -farmcontentaccesspassword Feb19Upd@t
 stsadm.exe -o editssp -title SharedServices1 -ssplogin REDMOND\sicfgact -ssppassword Feb19Upd@t
 stsadm.exe -o osearch -farmserviceaccount REDMOND\sicfgact -farmservicepassword Feb19Upd@t
 
锁定网站 
 stsadm -o getsitelock -url http://sdt-help/personal/test
 stsadm -o setsitelock -url http://sdt-help/personal/test -lock readonly
 
修复数据库 
 stsadm -o databaserepair -url http://portalsuat/smspindia/bi -databasename WSS_Content_PORTALSUAT02c
 stsadm -o databaserepair -url http://portalsuat/smspindia/bi -databasename WSS_Content_PORTALSUAT02b -deletecorruption
 
删除网站 
 stsadm -o deletesite -url http://portalsuat/smspindia/bi
 
转移所在数据库 
 Stsadm -o enumsites -url http://portalsuat > C:\SYSTEM_LOG\2009-03-26\sites.xml 
 Stsadm -o mergecontentdbs -url http://portalsuat -sourcedatabasename WSS_Content_PORTALSUAT02b -destinationdatabasename WSS_Content_PORTALSUAT02c -operation 3 -filename C:\SYSTEM_LOG\2009-03-26\sites.xml 
 iisreset /noforce
 
升级sharepoint 6332 
 cd %commonprogramfiles%\Microsoft Shared\Web server extensions\12\Bin
 stsadm -o preparetomove -contentdb SIMOSSSHOWSQL01:WSS_Content_SIDEVVM02 -site http://sidevvm02
 stsadm -o deletecontentdb -url http://sidevvm02 -databasename WSS_Content_SIDEVVM02
 net start spadmin 
 net start sptimerv3
 psconfig -cmd upgrade -inplace b2b -force
 stsadm -o addcontentdb -url http://sidevvm02 -databasename WSS_Content_SIDEVVM02
 
安装激活feature 
 stsadm -o installfeature -filename [feature文件夹下]\feature.xml
 stsadm -o activatefeature -filename [feature文件夹下]\feature.xml -url http://[计算机名]:[端口]/sites/portol -force

你可能感兴趣的:(SharePoint)