In SharePoint 2007, every Web Application has its own content database(s). Yes, the WebApps can contain more than one Content Database - moreover, we can change the default content DB.
Why is it important for us? Just for fun? - No, of course.
It can be important, for example, if we have to move a full site with all content. The steps of creating the new Web Application with the original content are the followings:
- Create the new Web Application on the Central Administration site. You have to give a name for the Content Database - as it's a temporary DB for you, call "ContentDB_Tmp".
- From this point forward, you can choose the Central Admin UI or stsadm. I like stsadm better, so let's see, how we can change the Content DB with the help of this command.
- First of all, if you're not sure in the related content DBs, run the following stsadm command:
stsadm -o enumcontentdbs -url http://mymoss
<Databases Count="1">
<ContentDatabase Server="MYDBSERVER" Name="ContentDB_Tmp" />
</Databases>
- Now you have the exact name of the temporary content database (ContentDB_Tmp). Let's delete it!
stsadm -o deletecontentdb -url http://mymoss
-databasename ContentDB_Tmp -databaseserver MYDBSERVER
- Well, currently we have an empty Web Application with no Content Database. Let's add the original one, called ContentDB_FullContent!
stsadm -o addcontentdb -url http://mymoss
-databasename ContentDB_FullContent -databaseserver MYDBSERVER
- That's all! To check your results, run the following command again:
stsadm -o enumcontentdbs -url http://mymoss
<Databases Count="1">
<ContentDatabase Server="MYDBSERVER" Name="ContentDB_FullContent" />
</Databases>
Posted
Aug 11 2008, 04:59 PM
by
aghy