Home
%3CLINGO-SUB%20id%3D%22lingo-sub-333234%22%20slang%3D%22en-US%22%3ELog%20Shipping%20Content%20Databases%20in%20SP2010%20and%20refreshing%20the%20listing%20of%20site%20collections%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-333234%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20MSDN%20on%20Aug%2026%2C%202011%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EThere%20seems%20to%20be%20a%20little%20bit%20of%20confusion%20about%20what%20happens%20to%20your%20sites%20tables%2Flisting%20of%20sites%20when%20you're%20log%20shipping%20content%20databases%20in%20SharePoint%202010.%20Let's%20imagine%20this%20scenario.%20Let's%20say%20you%20create%20a%20site%20collection%20in%20your%20production%2Flive%20farm.%20The%20site%20provisioning%20process%20creates%20an%20entry%20in%20the%20sites%20table%20in%20your%20config%20DB.%20The%20next%20time%20the%20logs%20get%20shipped%2C%20the%20site%20collection%20will%20be%20in%20the%20content%20database%20in%20your%20standby%20farm.%20Since%20you're%20not%20log%20shipping%20the%20config%20DB%20(it's%20unsupported)%20you%20won't%20get%20an%20entry%20for%20your%20new%20site%20in%20your%20standby%20farm.%20Many%20places%20say%20that%20you%20need%20to%20detach%20and%20reattach%20your%20content%20databases%20in%20your%20standby%20farm.%20While%20this%20will%20work%2C%20it's%20not%20true.%20You%20can%20use%20PowerShell%20to%20make%20this%20happen%20automatically.%20You%20could%20also%20access%20the%20%3CA%20href%3D%22http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fmicrosoft.sharepoint.administration.spcontentdatabase.refreshsitesinconfigurationdatabase.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20RefreshSitesInConfigurationDatabase%20%3C%2FA%3E%20method%20with%20the%20SharePoint%20OM%20if%20you%20want%20as%20well.%3C%2FP%3E%0A%20%20%3CBLOCKQUOTE%3E%0A%20%20%20%3CP%3E%24db%20%3D%20Get-SPDatabase%20%7C%20where%20%7B%24_.Name%20-eq%20%22DatabaseName%22%7D%20%3CBR%20%2F%3E%20%24db.RefreshSitesInConfigurationDatabase()%3C%2FP%3E%0A%20%20%3C%2FBLOCKQUOTE%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-333234%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Aug%2026%2C%202011%20There%20seems%20to%20be%20a%20little%20bit%20of%20confusion%20about%20what%20happens%20to%20your%20sites%20tables%2Flisting%20of%20sites%20when%20you're%20log%20shipping%20content%20databases%20in%20SharePoint%202010.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-333234%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Edatabase%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDisaster%20Recovery%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharepoint%202010%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharepoint%20Server%202010%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on MSDN on Aug 26, 2011

There seems to be a little bit of confusion about what happens to your sites tables/listing of sites when you're log shipping content databases in SharePoint 2010. Let's imagine this scenario. Let's say you create a site collection in your production/live farm. The site provisioning process creates an entry in the sites table in your config DB. The next time the logs get shipped, the site collection will be in the content database in your standby farm. Since you're not log shipping the config DB (it's unsupported) you won't get an entry for your new site in your standby farm. Many places say that you need to detach and reattach your content databases in your standby farm. While this will work, it's not true. You can use PowerShell to make this happen automatically. You could also access the RefreshSitesInConfigurationDatabase method with the SharePoint OM if you want as well.

$db = Get-SPDatabase | where {$_.Name -eq "DatabaseName"}
$db.RefreshSitesInConfigurationDatabase()