About Me

SharePoint Architect with over 17 years of IT Experience in various roles as SharePoint Architect, Administrator, Technical Architect, IT Analyst, Application Developer, CRM Consultant, BI Developer, Microsoft Solution Architect in Client/Server, Web and Enterprise CRM Applications in E-Commerce, Financial, Healthcare, Insurance, Telecom, Outsourcing and Technology Services.
MCITP (Pro): Microsoft Certified IT Professional: SharePoint 2010 Administrator.
MCTS: Microsoft Certified Technology Specialist, SharePoint 2010 Configuration.

Thursday, August 7, 2014

Assign New Database Id




stsadm -o addcontentdb -url http://portal -databasename WSS_Content_DB -assignnewdatabaseid

content database shows zero site collections in it You probably need to update the site map in the config db.


$db = get-spcontentdatabase -Identity [insert guid of cdb here]
$db.RefreshSitesInConfigurationDatabase()


$app = get-spwebapplication identity url of the problem web app
$app.contentdatabses.count


$db = get-spwebapplication identity url of the webapplication that had the null entry 
$db.contentdatabses.delete(“guidOfProblemDb”)
$db = Get-SPDatabase -Identity "guidOfProblemDb"
$db.Delete()

No comments:

Post a Comment