Upgrade SP2010 database

Get-SPContentDatabase -Identity “rest2_WSS_Content_Portal_2000”
Id : 1b1f60b6-c71e-48ec-866f-01c29753f3e5
Name : rest2_WSS_Content_Portal_2000
WebApplication : SPWebApplication Name=Portal – 2000
Server : srv-portal-04
CurrentSiteCount : 1

 

upgrade-spcontentdatabase -id <GUID>

Upgrade SP2010 database

Restore SP 2010 content database

check web app and proper database:

Get-SPContentDatabase -WebApplication http://portal

stop timer jobs and\or crawling:

Get-SPTimerJob -WebApplication “http://portal” | select name | Out-File “C:\scripts\timerjobfile2.txt” -Append -Encoding ascii

ForEach($tmrjob in (Get-Content “c:\scripts\timerjobfile2.txt”)) { Get-SPTimerJob -Identity $tmrjob | Disable-SPTimerjob }

dismount content database:

Dismount-SPContentDatabase “WSS_Content_Portal_2000”

detach and move database on SQL server (using management studio) or attach a new database

mount content database:

Mount-SPContentDatabase “rest2_WSS_Content_Portal_2000” -DatabaseServer “srv-portal-04” -WebApplication http://portal

start timer jobs and\or crawling:

ForEach($tmrjob in (Get-Content “c:\Scripts\timerjobfile2.txt”)) {Get-SPTimerJob -Identity $tmrjob | Enable-SPTimerjob}

Check web app and proper database once again:

Get-SPContentDatabase -WebApplication http://portal

Restore SP 2010 content database