Pages

Sunday, 20 May 2012

Database attach method to upgrade to a new farm

ADDCONTENTDB


stsadm -o addcontentdb -url  http://intranet  -databasename wss_content_hr -databaseserver yoursqlservername\instancename

if you have multiple subsites then you can very well include all of those stsadm database attach command in a batch file and execute it at one stretch.
ex:
save the below in a execute.bat file:
'----
stsadm -o addcontentdb -url http://intranet -databasename wss_content_hr -databaseserver yoursqlservername\instancename >> result.txt


stsadm -o addcontentdb -url  http://intranet/sites/hr -databasename wss_content_hr -databaseserver yoursqlservername\instancename >> result.txt


stsadm -o addcontentdb -url  http://intranet/sites/it -databasename wss_content_hr -databaseserver yoursqlservername\instancename >> result.txt

'----
the above file execute.bat once executed will append result.txt with the upgrade status.

No comments:

Post a Comment