I changed the name of our Sharepoint_AdminContent db (to remove the GUID) using the script below and now I get a 404 error when trying to browse to Central Administration. SharePoint 2013. Verified in IIS that the app pool is running.

Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

List all web applications

Get-SPWebApplication -IncludeCentralAdministration

$CentralAdminUrl = "http://sp2013v2:2013/"
$CentralAdminDB = Get-SPContentDatabase -WebApplication $CentralAdminUrl

Verify the database object is good


New DB Name

$NewCentralAdminDBName = "01_Content_NewCentralAdmin"
$NewCentralAdminContentDB = New-SPContentDatabase -Name $NewCentralAdminDBName -WebApplication $CentralAdminUrl -MaxSiteCount 2 -WarningSiteCount 1

Verify the database is added

Get-SPContentDatabase -WebApplication $CentralAdminUrl

Verify the database object is good


Move the Sites to nicely named DB

$CentralAdminDB.Sites | % {Move-SPSite $_ -DestinationDatabase $NewCentralAdminContentDB -Confirm:$false -Verbose}

Verify the Site collection are moved

Get-SPContentDatabase -WebApplication $CentralAdminUrl

If databases are moved then dismount the orignal DB

Dismount-SPContentDatabase $CentralAdminDB -Confirm:$false -Verbose

Confirm First Database is gone

Get-SPContentDatabase -WebApplication $CentralAdminUrl

Delete the database from SQL Server

  • Did you do an iisreset? – harshal gite Sep 9 '19 at 15:38
  • Yes. Didn't work. :( – Mserna Sep 9 '19 at 16:34
  • I confirmed that the app pool is running. The app pool is running under the farm admin account, but the db itself is "owned" by different admin account. Could that be the problem? – Mserna Sep 9 '19 at 16:38
  • Maybe. Who was the owner of old db? – harshal gite Sep 9 '19 at 16:42
  • Ashamed to say I don't know. I know the 2 possible owners, though. – Mserna Sep 9 '19 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.