MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Changing a sites content DB

  Asked By: Deborah    Date: Dec 03    Category: MOSS    Views: 1030

I think this is an easy question, well, I hope so. I have just created a new
site collection train. Then I created a new Content DB contentTrain.
There must be a way using stsadm to point that sitecolletion to the new content
DB, but everything I google is talking about creating and deleting or moving
contentDB's. Can someone point me to the correct command?



5 Answers Found

Answer #1    Answered By: Rosalinda Merrill     Answered On: Dec 03

Use STSADM mergecontentdbs. Outlined here,

Answer #2    Answered By: Yogendra Zarapkar     Answered On: Dec 03

That's so funny. I was just getting ready to respond with an article on that
very cmdlet

Answer #3    Answered By: Jerad Mercado     Answered On: Dec 03

I've had mixed results using MergeContentDB myself, that is why I use the

Answer #4    Answered By: Riley Scott     Answered On: Dec 03

And I've had problems with the manual method which is why I use

In SharePoint 2003, and I think 2007 it was possible to make a backup
that was successful that you could not restore. Of course you didn't
find this out until after you had deleted the original instance of the
site collection. I got bit by that twice. It was not fun.

Answer #5    Answered By: Adya Khavatekar     Answered On: Dec 03

Here is the batch file I use to move site collections between DBs-

stsadm -o preparetomove -site %1

stsadm -o setsitelock -url %1 -lock readonly

stsadm -o backup -url %1 -filename d:\backups\%2.bak -overwrite

stsadm -o setsitelock -url %1 -lock none


stsadm -o deletesite -url %1

stsadm -o restore -url %1 -filename d:\backups\%2.bak

stsadm -o setsitelock -url %1 -lock none

stsadm -o preparetomove -site %1 -undo

Put that in a text file and change the name to something like MoveSC.bat

MoveSC.bat <Url of SC> <Name for backup file>
ie MoveSC http://Sharepoint/sites/foo foo_backup

The pause is in there so you can confirm the backup succeeded before
deleting the site.

To ensure it goes to the DB you want, set all the other DBs to Offline, and
the one you want to receive the site to Ready. (Central Admin -> Application
Management -> Content Databases -> Web Application in Question Click on DB
name and set DB status.

Note: Setting a DB to Offline does not take it 'offline', it does have two
effects: 1) no new sites can be created in it; 2) It will not sync with AD
via the SSP.

Didn't find what you were looking for? Find more on Changing a sites content DB Or get search suggestion and latest updates.