Managing Content Databases and Site Collections

The built-in cmdlets enable you to manage content databases. If a SharePoint farm is not adequately planned, one of your content databases might grow too large. In such scenarios, you can rely on PowerShell to fix the problem. Type the following command to create a new database:

image

The preceding command will create a new content database for the portal web application. All the other database settings (for example, database server, warning site count, and maximum site count) can be changed at a later stage with the Set-SPContentDatabase cmdlet.

The following example demonstrates how warning and maximum site levels can be changed via PowerShell. Type the following to change the warning and maximum site count to 1000 and 2000, respectively:

image

With multiple databases per web application, you can now easily move site collections between databases. Use the following code (make sure you already have "WSS_Portal_Content_New" in place):

image

The preceding command moves the site collection at the given URL (“http://portal.companyABC.com/sites/sub-site-collection”) to the new database. If you omit the -confirm parameter, you will be prompted to confirm this operation. As noted in the warning, IIS must be restarted to complete the move. This can be accomplished by using the iisreset command.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset