Link to home
Start Free TrialLog in
Avatar of jmicorp
jmicorpFlag for United States of America

asked on

Attempted moving content and config databases to new server -- now I'm royally boned

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

Successful.

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!
ASKER CERTIFIED SOLUTION
Avatar of MsShadow
MsShadow
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jmicorp

ASKER

I hadn't seen the first mention of this tool. Is this necessary when moving the MDF/LDF pairs for the database from one server to another? From what I can tell from the technet description, this command is used for moving just the content inside the DB, not the db itself.

i've got a backup from the night before with inetpub still completely intact (not to mention the whole file system). how might one suggest getting this back??
Avatar of jmicorp

ASKER

i've tried -deleteconfigdb .. had to run it twice before it actually completed successfully.

now, psconfig -cmd configdb -connect -server -dbuser -dbpassword -user -password

Fails telling me that no matter what database I use, its invalid. "The server parameter specified with the configdb command is invalid."

i've triple checked to ensure that my strings are correct. When I inspect failed configuration installation logs, I'm getting errors stating:


01/08/2010 14:02:57  9  ERR                                                Task configdb has failed
01/08/2010 14:02:57  9  INF                                                friendlyMessage for task configdb is An exception of type System.ArgumentNullException was thrown.  Additional exception information: Value cannot be null.
Parameter name: str
01/08/2010 14:02:57  9  INF                                                debugMessage for task configdb is An exception of type System.ArgumentNullException was thrown.  Additional exception information: Value cannot be null.
Parameter name: str
System.ArgumentNullException: Value cannot be null.
Parameter name: str
   at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
   at Microsoft.SharePoint.Administration.SPFileSystemCache.GetFileInfoFromId(Guid objectId)
   at Microsoft.SharePoint.Administration.SPFileSystemCache.PutObjectInFileSystem(SPPersistedObject obj)
   at Microsoft.SharePoint.Administration.SPFileSystemCache.SetValue(Guid id, SPPersistedObject obj)
   at Microsoft.SharePoint.Administration.SPCache`2.set_Item(K key, V value)
   at Microsoft.SharePoint.Administration.SPConfigurationDatabase.RefreshCache(Int64 currentVersionOverride, List`1& newObjects, List`1& deletedObjects, Int64& newestObjectVersion)
   at Microsoft.SharePoint.Administration.SPConfigurationDatabase.RefreshCache()
   at Microsoft.SharePoint.Administration.SPConfigurationDatabase.StoreObject(SPPersistedObject obj, Boolean storeClassIfNecessary, Boolean ensure)
   at Microsoft.SharePoint.Administration.SPConfigurationDatabase.PutObject(SPPersistedObject obj, Boolean ensure)
   at Microsoft.SharePoint.Administration.SPPersistedObject.Update()
   at Microsoft.SharePoint.Administration.SPWebApplication.ApplyWebConfigModifications()
   at Microsoft.SharePoint.Administration.SPWebApplication.Provision()
   at Microsoft.SharePoint.Administration.SPWebServiceInstance.Provision()
   at Microsoft.SharePoint.Administration.SPFarm.Join()
   at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb()
   at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run()
   at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ted Bouskill
I'd recommend you contact Microsoft Support.  Sharepoint is very sensitive to configuration changes.  For example, if you didn't block all access to the Sharepoint sites and stop all Sharepoint services while making these changes your configuration might be damaged.
Avatar of jmicorp

ASKER

Itgroove, youre mostly right. What I was doing wrong was trying to reuse the Sharepoint configuration databases. I pulled them into offline mode, started the configuration wizard from the server again, gave it a specific db name instead of "SHAREPOINT_CONFIG" and let it build itself over. Once I had the system alive, I readded each web, pointing to the appropriate inetpub folder and sql database for the existing application. I had to reload all addins/wsp's/etc after I attached all the application(s). Further, I had to apply any customizations to the SSP. Learning experience!
Avatar of jmicorp

ASKER

I ended up answering my own question, but itgroove was correct and shadow had good input.