Attach existing Content Database to new SharePoint Site Collection
- Get link
- Other Apps
This blog will describe how to attach, detach a content database.
Below is the scenario -
You created a new Site collection in SharePoint 2010.
Now you want this site collection to work with your existing Content database.
Simply you can be asked that you have an existing content database and you need to attach it with the new Site collection.
Solution:
So you have created a new Site collection and want to attach existing content Database.
Let's start this process.
First, you need to Remove Existing Content database which is associated with your new site collection.
To do this, go to Central Admin
Application Management, under databases you will find Manage content Databases. click on that link.
Select your web application, your content database will be shown. click on Content Database. On the new page, you need to select a checkbox "Remove content database" and click OK.
So you have successfully removed Content Database from the new Site collection.
Next step is to attach an existing content database to your new site collection.
There could be 2 scenarios.
1. ) Your existing Content Database is associated with one site collection - In this case, you need to run below command to detach this content database.
Dismount-SPContentDatabase "WSS_Content_Old"
You will be asked to confirm this, please type Y and hit enter. Then you may run Mount command.
2.) Your existing Content Database is not associated with any site collection - In this case no problem, no need to Dismount it directly you can run Mount command.
Mount-SPContentDatabase "WSS_Content_Old" -DatabaseServer "DBServerName" -WebApplication "http://siteurl" -AssignNewDatabaseId
Here is output for this -
Now you may restore a bak file to this site if required. Also, you may deploy your WSP solution, if required.
So you are done with Attaching existing content database with the new Site collection.
Below is the scenario -
You created a new Site collection in SharePoint 2010.
Now you want this site collection to work with your existing Content database.
Simply you can be asked that you have an existing content database and you need to attach it with the new Site collection.
Solution:
So you have created a new Site collection and want to attach existing content Database.
Let's start this process.
First, you need to Remove Existing Content database which is associated with your new site collection.
To do this, go to Central Admin
Application Management, under databases you will find Manage content Databases. click on that link.
Select your web application, your content database will be shown. click on Content Database. On the new page, you need to select a checkbox "Remove content database" and click OK.
So you have successfully removed Content Database from the new Site collection.
Next step is to attach an existing content database to your new site collection.
There could be 2 scenarios.
1. ) Your existing Content Database is associated with one site collection - In this case, you need to run below command to detach this content database.
Dismount-SPContentDatabase "WSS_Content_Old"
You will be asked to confirm this, please type Y and hit enter. Then you may run Mount command.
2.) Your existing Content Database is not associated with any site collection - In this case no problem, no need to Dismount it directly you can run Mount command.
Mount-SPContentDatabase "WSS_Content_Old" -DatabaseServer "DBServerName" -WebApplication "http://siteurl" -AssignNewDatabaseId
Here is output for this -
Id : 2617bb2a-b21a-4f77-bcc4-539a987a9639
Name : WSS_Content_Old
WebApplication : SPWebApplication Name=SharePoint - 1000
Server : servername
CurrentSiteCount : 1
Now you may restore a bak file to this site if required. Also, you may deploy your WSP solution, if required.
So you are done with Attaching existing content database with the new Site collection.
- Get link
- Other Apps

Comments
Popular
Top 30 ASP.Net Web API Interview Questions and Answers
CAML Query Tutorial for SharePoint 2013 and 2010 - A Complete tutorial guide
CAML Query is one of the most important topics in SharePoint. CAML Query is the way for querying items from SharePoint objects like List and Library. This blog is helpful in SharePoint 2010 development as well as in SharePoint 2013 development.
What is MicroService? A modern approach to develop software applications
Before describing MicroServices we should first understand distributed technologies we already have in the industry. Prior to MicroServices, we have already Web Services, WCF Service and latest one from Microsoft i.e. ASP.Net Web API. Then Why MicroService Architecture?
You may read about all these distributed technologies in details in my earlier blog.
You may read about all these distributed technologies in details in my earlier blog.
How to consume RESTful APi from server side code - C#
What's new in C# 6.0 language?
SharePoint Interview Questions and Answers
Introduction to ASP.NET Core - Basic Introduction with Visual Studio 2015 and 2017
All about SharePoint 2010 Content Type Hub - SharePoint 2010 Tutorial
ASP.Net Web API Security
If you are new to ASP.Net Web API then please start from the beginning level. What is ASP.Net Web API? In the previous blog, I wrote about Routing in Web API. You may also like .Net Core Introduction and MicroService Architecture.
I have also explained, How to create a secure Web API? in my earlier blog.
In this blog, let's discuss the Web API security in details.
I have also explained, How to create a secure Web API? in my earlier blog.
In this blog, let's discuss the Web API security in details.
Getting started with Microsoft Azure
If you are new to Microsoft Azure, then please read my earlier blog on Cloud Computing and Microsoft Azure introduction.
In this blog, I will explain how to create resources in Azure Dashboard and will show you screenshots. This will be a totally new experience for me as well because I am also new to Cloud Computing and wanted to share my experience through my blog.
In this blog, I will explain how to create resources in Azure Dashboard and will show you screenshots. This will be a totally new experience for me as well because I am also new to Cloud Computing and wanted to share my experience through my blog.
Tags
Tags
cloud-computing12
sharepoint-201310
interview8
sql8
webservice7
angularjs6
entity-framework6
design-pattern5
linq5
sharepoint-programming5
powershell4
socialmedia4
caml3
dot-net-core3
rest3
workflow3
ajax2
aws2
html2
infopath2
javascript2
oops2
searchservice2
sharepoint-interview2
soa2
timer job2
website2
3tier1
active-directory1
caching1
devops1
fba1
imageupload1
json1
list1
managed-metadata-service1
metadata1
odata1
page-layout1
performance1
run with elevated1
safecontrol1
security1
sharepoint interview questions1
sharepoint security1
sharepoint-architecture1
sharepoint-branding1
sharepoint-migration1
sharepoint-service1
sharepoint-topics1
sharepointlist1
site-definition1
soap1
uls1
validation1
viewstate1
xml1
Show more
Show less
Nice blog for upgrading content database.
ReplyDeleteIt helped me alot in my current task.
Appreciated.