🔧
SharePoint 2013 のコンテンツ データベースの名前を変更する
SharePoint 2013 をインストールすると、初期状態で管理センター用にコンテンツ データベースが作成されます。このデータベースの名前は SharePoint_AdminContent_{{guid}}
となりますが、GUID を付与する必要がない場合もあるため、データベースの名前を変更する方法をご紹介します。
まず、現在のコンテンツ データベースの情報を取得します。
Get-SPContentDatabase -WebApplication "{{web-application-url}}"
ID を指定してコンテンツ データベースを切断します。
Dismount-SPContentDatabase -Identity "{{content-database-id}}"
SQL Server Management Studio で SQL Server にログインし、データベースの名前を変更します。
変更が完了したら、コンテンツ データベースに再接続します。データベースのサーバー名は省略可能です。また、データベースのサーバー名に localhost は指定できません。SQL Server と SharePoint が同じマシンにインストールされている場合でも、マシン名を指定する必要があります。
Mount-SPContentDatabase -Name "{{content-database-name}}" -DatabaseServer "{{server-name}}" -WebApplication "{{web-application-url}}"
Discussion