Adding a content database using PowerShell in SharePoint 2010

To attach an existing content database:

Mount-SPContentDatabase "<ContentDb>" –DatabaseServer "<DbServer>" –WebApplication http://WebapplicationName

<ContentDb> is the content database to be attached.

<DbServer> is the name of the database server.

http://WebapplicationName is the name of the Web application to which the content database is being attached.

To detach a content database:

Dismount-SPContentDatabase "<ContentdBName>"

Where is the name of the content database.

0 comments:

Post a Comment

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at sharepointprogrammingblogger@gmail.com .

Copyright (c) 2010 @ myshaepointwork.blogspot.com. All rights are reserved.Do Not Copy.

@ Learning SharePoint.com