Our current LAB and DEV environments are VMware based and house the database server inside the VM. Performance has gotten pretty terrible and as a result, I set about migrating the database portion of these servers to a physical database server to help performance woes. I read for days on how to move the content and configuration databases to another host so that I could smoothly transition from one server to another. Alas..
I did a test run on LAB using stsadm -o deletecontentdb -url http://myurl1
-databaseserver labdb -databasename myurl1db
I followed it up with another stsadm -o addcontent db -url http://myurl1
-databaseserver newdb\lab -databasename myurl1db
This worked. Eureka.
So I used the same process to revert it back to the original db. Again, success.
I wrote a short batch script to delete the content dbs for my 7 sites. The next step in the batch is to delete the config db... stsadm -o deleteconfigdb
Immediately afterwards, the config db is brought back online with stsadm -o setconfigdb -connect -databaseserver newdb\lab -databasename Sharepoint_Config -farmuser ad\someuser -farmpassword somepassword
Finally, the script readds all the sites to the new server as produced above.
Failure. States that a database of the same database id already exists. So i rewrite the adds to include "assignnewdatabaseid". They all load this way, but cannot load. Also, I have no admin page. Through much fuss, I attempt to back out and simply reattach to the original DB. Now the errors start. I can't complete a setconfigdb -- gives me a parameter error "value cannot be null, parameter name: str". So through much reading I attempt to reverse this a step deeper using psconfig -cmd configdb. It runs successfully. However, still getting the value cannot be null, parameter name: str error when attempting to attach contentdbs. Further, my inetpub directory is now EMPTY!
How did this happen? What can I do?? Fortunately this is LAB, but I need to thoroughly understand this!