{"id":1055,"date":"2012-07-02T20:58:28","date_gmt":"2012-07-02T19:58:28","guid":{"rendered":"http:\/\/www.stuartroberts.net\/?p=1055"},"modified":"2012-07-02T21:00:11","modified_gmt":"2012-07-02T20:00:11","slug":"default-content-database","status":"publish","type":"post","link":"https:\/\/www.stuartroberts.net\/index.php\/2012\/07\/02\/default-content-database\/","title":{"rendered":"Default Content Database"},"content":{"rendered":"<p>Nothing too complicated today but something that some people aren&#8217;t aware of and ask if it can be done &#8211; having more than one content database so they can, for example, keep sensitive data separate from their general day to day content.<\/p>\n<p>It&#8217;s simple enough to create multiple content databases in Central Administration:<\/p>\n<p>Within <em>Application Management<\/em>, click the <em>Manage Content Databases<\/em> link.  This will take you to the <em>\/_admin\/CNTDBADM.aspx<\/em> page.<\/p>\n<p>From that page, click the <em>Add a content database<\/em> link.  Ensure the <em>Web Application<\/em> is set to the one where you want new site collection to be created in, fill in the new content database form and click OK.  After a short while your new content database will be ready to use.<\/p>\n<p><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/content_databases.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/content_databases-1024x222.jpg\" alt=\"\" title=\"Content Databases\" width=\"480\" height=\"104\" class=\"aligncenter size-large wp-image-1058\" srcset=\"https:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/content_databases-1024x222.jpg 1024w, https:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/content_databases-300x65.jpg 300w, https:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/content_databases.jpg 1213w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>There are a couple of ways to setup the content database as the default database for new site collections.  The first is:<br \/>\n<!--more--><br \/>\n<strong>Method 1<\/strong><br \/>\nClick on <em>every<\/em> content database that you do not want the new site collection to be created in and set the <em>Database Status<\/em> to <em>Offline<\/em>.<\/p>\n<p><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/Offline.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/Offline.jpg\" alt=\"\" title=\"Offline\" width=\"233\" height=\"155\" class=\"aligncenter size-full wp-image-1060\" \/><\/a><\/p>\n<p>This does not delete\\remove the content database or make it unavailable.  All it does is prevent SharePoint from creating new site collections within that database.<\/p>\n<p>I don&#8217;t recommend leaving your content databases in an offline state once the site collection has been created, as the user profile store will become out of sync as SharePoint will skip the sites within the offline databases. This is due to how SharePoint stores user information at each site collection level, meaning updates made will not propagate to the User Profile application.<\/p>\n<p><strong>Method 2<\/strong> (My preferred method)<br \/>\nA better way of achieving this is to keep all content databases online (status of Ready) unless you have a specific reason for taking it offline.  To force SharePoint to create new site collections within a single database, set the <em>Maximum number of sites that can be created in this database<\/em> to the current number of sites for every database except for the one you want to use.<\/p>\n<p><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/Content-Database-Info.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/Content-Database-Info.jpg\" alt=\"\" title=\"Content Database Info\" width=\"719\" height=\"142\" class=\"aligncenter size-full wp-image-1061\" srcset=\"https:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/Content-Database-Info.jpg 719w, https:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/Content-Database-Info-300x59.jpg 300w\" sizes=\"(max-width: 719px) 100vw, 719px\" \/><\/a><\/p>\n<p>and the edit page for WSS_Content:<\/p>\n<p><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/Maximum-Sites.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/Maximum-Sites.jpg\" alt=\"\" title=\"Maximum Sites\" width=\"955\" height=\"111\" class=\"aligncenter size-full wp-image-1062\" srcset=\"https:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/Maximum-Sites.jpg 955w, https:\/\/www.stuartroberts.net\/wp-content\/uploads\/2012\/06\/Maximum-Sites-300x34.jpg 300w\" sizes=\"(max-width: 955px) 100vw, 955px\" \/><\/a><\/p>\n<p>Subsequently, when a new site collection is created, SharePoint will create it within the content database (WSS_Content_2 in the example above) that has capacity to take on more sites, which should only be the one database that you left with room for new sites.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nothing too complicated today but something that some people aren&#8217;t aware of and ask if it can be done &#8211; having more than one content database so they can, for example, keep sensitive data separate from their general day to &hellip; <a href=\"https:\/\/www.stuartroberts.net\/index.php\/2012\/07\/02\/default-content-database\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[33,3],"tags":[26,88,81],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/plx2I-h1","_links":{"self":[{"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/1055"}],"collection":[{"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/comments?post=1055"}],"version-history":[{"count":11,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/1055\/revisions"}],"predecessor-version":[{"id":1072,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/1055\/revisions\/1072"}],"wp:attachment":[{"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/media?parent=1055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/categories?post=1055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/tags?post=1055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}