生活资讯
Attach or detach content databases in SharePoint Server
2024-12-26 15:37  浏览:89

You can attach or detach SharePoint Server content databases by using the SharePoint Central Administration website or Microsoft PowerShell

Before you begin this operation, review the following information:

  • If you want to create a new content database while you attach it, the SharePoint farm service account must be a member of the SQL Server dbcreator fixed server role. To attach a content database to a web application, the SharePoint farm service account must have db_owner permission for the content database.

  • If the database already exists, it must be the same version as the SharePoint Server 2016 farm or this operation will fail. To attach a content database that is a different version than the farm, use the To attach or detach a content database by using Windows PowerShell procedure in the following section.

You might want to attach or detach content databases for the following reasons. You want to add a new content database for new site collections to keep content databases at a manageable size. You are restoring a content database from another farm and you want the sites that it contains to be accessed from a web application. You have archived site collections out of a content database and then detach the content database from the web application. For more information, see Move site collections between databases in SharePoint Server

The steps to add a database and to attach a database are very similar. For more information about how to add a database, see Add content databases in SharePoint Server.

  1. Verify that the user account that is being used to perform this operation is a member of the Farm Administrators SharePoint group.

  2. Start Central Administration.

  3. On the SharePoint Central Administration website, click Application Management.

  4. On the Application Management page, in the Databases section, click Manage content databases.

  5. On the Manage Content Databases page, click Add a content database.

  6. On the Add Content Database page:

  • Use the Web Application drop-down menu to select the web application to which you want to attach a content database.

  • Specify the database server that hosts the database.

  • Specify the database name. If the database does not already exist, it will be created.

  • Specify the authentication method for the database, and supply an account name and password if you are using SQL authentication.

  • Click OK.

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.

  2. On the SharePoint Central Administration website, click Application Management.

  3. On the Application Management page, in the Databases section, click Manage content databases.

  4. Select the web application for which you want to detach a content database.

  5. Click the content database that you want to detach.

  6. On the Manage Content Database Settings page, select the Remove content database check box.

    If the content database contains data, you will receive a warning. Click OK to continue with the operation.

  7. Click OK to confirm the detachment, or click Cancel to stop the operation without detaching the database.

    After detaching the content database in Central Administration, the content database still exists in SQL Server. If you want to permanently remove the content database, you must do so by using a SQL Server procedure.

  1. Verify that you have the following memberships:
  • securityadmin fixed server role on the SQL Server instance.

  • db_owner fixed database role on all databases that are to be updated.

  • Administrators group on the server on which you are running the PowerShell cmdlets.

    An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint Server cmdlets.

  1. Open SharePoint Management Shell.

  2. At the PowerShell command prompt, type the appropriate command

    To attach an existing content database:

    
    

    Where:

    • <ContentDb> is the content database to be attached.

    • <DbServer> is the name of the database server.

    • http://SiteName is the name of the web application to which the content database is being attached.

    To detach a content database:

    
    

    Where <ContentdBName> is the name of the content database.

The Dismount-SPContentDatabase cmdlet detaches the content database from the web application, but it does not delete the content database from SQL Server. After a content database is detached, you cannot delete it by using PowerShell. You can only remove it by using SQL Server tools. If you want to delete the content database from SQL Server while you detach it, use the Remove-SPContentDatabase cmdlet instead.

For more information, see Dismount-SPContentDatabase and Mount-SPContentDatabase.

Other Resources

Get-SPContentDatabase

New-SPContentDatabase

    以上就是本篇文章【Attach or detach content databases in SharePoint Server】的全部内容了,欢迎阅览 ! 文章地址:http://ww.kub2b.com/tnews/1669.html
     栏目首页      相关文章      动态      同类文章      热门文章      网站地图      返回首页 企库往资讯移动站 http://ww.kub2b.com/mobile/ , 查看更多   
最新文章
耐水弹力海棉
产品属性用途区域产品包装、耐水 防潮密度0.02-0.18g/cm3原产地中国,江苏,常州品牌D-Foam形状可根据客户提供图纸生产颜色可根
耐水高强度海棉
产品属性用途区域产品包装、耐水 防潮密度0.02-0.18g/cm3原产地中国,江苏,常州品牌D-Foam形状可根据客户提供图纸生产颜色可根
防潮耐水EVA材料
产品属性用途区域产品包装、耐水 防潮密度0.02-0.18g/cm3原产地中国,江苏,常州品牌D-Foam形状可根据客户提供图纸生产颜色可根
耐油耐水海绵
产品属性用途区域产品包装、耐水 防潮密度0.02-0.18g/cm3原产地中国,江苏,常州品牌D-Foam形状可根据客户提供图纸生产颜色可根
供应耐水海绵
产品属性用途区域产品包装、耐水 防潮密度0.02-0.18g/cm3原产地中国,江苏,常州品牌D-Foam形状可根据客户提供图纸生产颜色可根
看了OPPO、vivo的新旗舰手机样张后,决定还是继续用微单吧
最近,OPPO、vivo都给出了自家旗舰手机的样张,大战一触即发。记得手机圈上一次这么火爆,还是小米15 Ultra的时候。具体来说,当
微信借钱不求人,6个步骤轻松搞定...手机微信怎么借钱「微信借钱不求人,6个步骤轻松搞定...」
微信,作为中国人日常生活中不可或缺的社交软件,不仅满足了人们的沟通需求,还悄然融入了金融服务,其中就包括微信借钱功能。无
小米8系列手机,有它才叫防摔保护手机爆屏「小米8系列手机,有它才叫防摔保护」
手机已成为日常生活必备品,而且小米8陶瓷后盖摔不得,维修的费用都赶上半个手机的钱了,选什么手机壳呢,贼难拆的磨砂硬壳?一
米其林指南开启江苏篇章,“江苏味”如何与世界“双向奔赴”
米其林指南作为餐饮界的“奥斯卡”,关注度高。2024年7月,米其林指南重调评价体系,转为省份榜单评选,并官宣江苏省、福建省成
重磅发布!5.4%!
4月16日,国家统计局发布的数据显示,一季度,在以习近平同志为核心的党中央坚强领导下,各地区各部门认真贯彻落实党中央、国务