[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2540
  • Last Modified:

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!
0
jmicorp
Asked:
jmicorp
2 Solutions
 
MsShadowCommented:
One thing that I'm already missing is the
Stsadm o preparetomove contentdb myurl1db

http://technet.microsoft.com/en-us/library/cc262122.aspx

I would suggest trying to do it by adding that command first.
0
 
jmicorpAuthor Commented:
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??
0
 
jmicorpAuthor Commented:
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

0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
itgrooveCommented:
I've seen this with publishing sites (or the collaboration portal).  If memory serves, it was related to the site directory and sites registered within.  anyways, I seem to recall giving up and instead, recreating the farm and restoring the web applications and content databases to it because with a new farm, the config database is recreated and the serial numbers will now all be unique.  In my case, we couldn't afford to be down longer, so it was quicker to build the farm and take it as a 'house cleaning' opportunity.
0
 
Ted BouskillSenior Software DeveloperCommented:
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.
0
 
jmicorpAuthor Commented:
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!
0
 
jmicorpAuthor Commented:
I ended up answering my own question, but itgroove was correct and shadow had good input.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now