A SharePoint content database is a repository that stores the content and data of a SharePoint site collection. It is a SQL Server database where all the site content, including documents, lists, libraries, metadata, and other associated information, is stored.
Each SharePoint site collection is associated with a content database. Multiple site collections can be stored within a single content database, depending on the configuration and performance requirements.
As the content of a SharePoint site collection grows, the size of the content database increases accordingly. It is essential to manage and maintain content databases effectively, including regular backups, proper sizing, and maintenance tasks to ensure optimal performance and reliability of the SharePoint environment.
Add a content database in SharePoint server from Central Admin
Configure SharePoint content databases by following these steps:
Open SharePoint Central Administration : Access the SharePoint Central Administration site using your admin credentials.
Navigate to the "Application Management" section : Click on "Application Management" in the left navigation menu.
Manage content databases : Under the "Databases" section, click on "Manage content databases."
Select the web application : Choose the web application associated with the content database you want to configure.
Add or remove content databases : In the "Content Databases" page, you can add or remove content databases for the selected web application. To add a new content database, click on "Add a content database" and provide the necessary details such as the database server, database name, authentication, and maximum site collections.
Set database settings : To configure the settings for an existing content database, select it from the list. Here you can modify the settings like maximum site collections, warning and maximum storage limits, as well as the authentication method.
Review and apply changes : Once you have made the desired changes, review the configuration settings, and click "OK" or "Save" to apply the changes.
Add SharePoint content database using PowerShell
Open the SharePoint Management Shell : Launch the SharePoint Management Shell as an administrator.
Connect to the SharePoint farm : Use the following command to connect to the SharePoint farm:
Connect-SpFarm -DatabaseServer "<DatabaseServerName>" -WebApplication "<WebApplicationURL>"
Replace `<DatabaseServerName>` with the name of the database server where you want to create the content database, and `<WebApplicationURL>` with the URL of the web application to which the content database will be associated.
Create a new content database : Use the following command to create a new content database:
New-SPContentDatabase -Name "<ContentDatabaseName>" -DatabaseServer "<DatabaseServerName>" -WebApplication "<WebApplicationURL>"
Replace `<ContentDatabaseName>` with the desired name for the content database.
Verify the creation of the content database : Use the following command to verify that the content database was created successfully:
Get-SPContentDatabase -WebApplication "<WebApplicationURL>"
This command will display a list of all content databases associated with the specified web application, including the newly created content database.
By following these steps, you can add a SharePoint content database using PowerShell. Make sure you have the necessary permissions and administrative rights to perform these actions.
Remember to follow best practices for content database configuration, including distributing site collections across multiple content databases for better performance and scalability. Additionally, regularly review and plan for the capacity and growth of content databases based on your organization's requirements.
Comments