Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am trying to upgrade a SharePoint 2003 web application to MOSS 2007 through the database attach method.

I am following these steps as outlined by Microsoft:

  • Create web application in MOSS 2007 and a new content database
  • Restore the 2003 backup in the new 2007 content database
  • Run the command "stsadm -o addcontentdb -url [url] -databasename [databasename] -databaseserver [databaseserver]"

In this last step, I am getting the error, "A SharePoint database named [databasename] already exists. You must supply another name for the new database." which makes no sense to me.

What could be the cause of this problem? Do you know of any workarounds? Thank you so much.

share|improve this question

migrated from stackoverflow.com Sep 15 '11 at 13:53

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 3 down vote accepted

It appears that when you created the new web application and database that it is already attached. If that is the case, then running the command will fail, you cannot add a content database that is already added. To check to see if this is the case, you can go into Central Adminsitration and view the content databases that are attached to the web application. You can upgrade the databases without having to restore them into a different content database. You can take the 2003 database and attach it directly to the web applicaiton using that command, and it will upgrade the database while attaching.

share|improve this answer
    
Lori -thank you so much, I did just that and it worked :) Now I cannot see the site collections of the web application I restored. What could I be doing wrong? Thank so much again. –  Bruno Ligutti Sep 15 '11 at 14:15
1  
Do an enumsites on that database and see if they appear there. Then I would follow Mikes suggestion below and remove the content database that might have duplicate entries. –  Lori Sep 15 '11 at 15:27

In response to your update, when you add a content database and there are no new sites showing, it typically means that there are multiple content databases with a site in the same location. This most frequently happens with the root site collection.

For example, you create a web application, content database and provision a root site collection to test it. You then attach another content database which also includes a root site collection. It will let you attach the db, but will not recognize the site until the 1st site collection or content database is removed.

share|improve this answer
    
Thank you so much @Mike, that was absolutely the case. –  Bruno Ligutti Sep 23 '11 at 15:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.