Respondida can i use Mount-SPContentDatabase command to attach site collection.

  • Wednesday, May 01, 2013 10:21 PM
     
     

    I am trying to migrate SharePoint 2007 to SharePoint 2010. So i took sql backup of a sitecollection from SharePoint 2007 and restored in Sql of SharePoint 2010. 

    now i want to attach the newly restored database to the new site collection i create in SharePoint 2010. 

    when i google i got a link where you can use powershell command "Mount-SPContentDatabase" and attach it to the web application but i want to attach to a sitecollection in already existing web application. 

    so how can i do it ??

    Thanks,

    M.M

All Replies

  • Wednesday, May 01, 2013 10:49 PM
    Moderator
     
     Answered

    Mount-SPContentDatabase is not used to attach to a site collection (a content database contains one or more site collections).

    If you want to move a site collection from one content database to another, then use Export-SPWeb/Import-SPWeb.


    SharePoint - Nauplius Applications
    Microsoft SharePoint Server MVP
    MCITP: SharePoint Administrator 2010

    -----------------------
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Thursday, May 02, 2013 11:13 AM
     
     Answered

    Hi,

    How about New-SPSite cmdlet to create site collection on restored database.



  • Thursday, May 02, 2013 10:24 PM
     
     Answered

    Actually you'd use Move-SPSite to move a site collection from one content database to another.

    M.M: your description of the problem is a little confusing as it appears you might be trying to mix terms. If all you want to do is upgrade a 2007 site collection to 2010 and have it available in your existing web application then Mount-SPContentDatabase is sufficient. If you're wanting to take an existing 2007 site collection, upgrade it to 2010 and then move the site collection as a child site of an existing site collection then you'll need to use Mount-SPContentDatabase to upgrade the site collection and then Export-SPWeb and Import-SPWeb to move the site collection; however, you'll likely hit tons of issues with the migrated site (if the import works at all).


    Gary Lapointe, Blog: http://blog.falchionconsulting.com/, Twitter: http://twitter.com/glapointe Aptillon Inc.: http://www.aptillon.com