top of page
Writer's pictureSubir Hazra

What is SharePoint content database and how to add it using Central Admin or PowerShell?

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.

29 views0 comments

Comments


Disclaimer

Welcome to my professional blog! The articles shared here are based on my personal experiences and knowledge, intended to serve as a valuable reference for myself and to assist readers like you.

 

Kindly refrain from reproducing my content in any manner without obtaining my explicit permission. In the event that any article infringes upon copyright regulations, please don't hesitate to reach out to me. I appreciate your input and encourage you to share your insights or alternative solutions by leaving a comment. Your valuable contributions are highly appreciated!

Copyright © 2023 by SHAREPOINT INSIGHTS. All rights reserved.

bottom of page