After running Test-SPContentDatabase you might get the following error :

Category        : Configuration
Error           : False
UpgradeBlocking : False
Message         : The [Application name] web application is configured with claims authentication mode however the content database you are trying to attach is intended to be used against a windows 
classic authentication mode.
Remedy          : There is an inconsistency between the authentication mode of target web application and the source web application. Ensure that the authentication mode setting in upgraded web 
application is the same as what you had in previous SharePoint 2010 web application. Refer to the link "http://go.microsoft.com/fwlink/?LinkId=236865" for more information.
Locations :

According to Microsoft : “This test runs a SQL query that returns the first site collection administrator for the first site collection in a content database and checks to see if the site collection administrator login name starts with an identity claims prefix for a user’s identity (i:). If it sees a string starting with anything other than “i:” it will report that that the database is intended to be used with a classic mode web application.”  Test-SPContentDatabase

you can run this sql on your stage content database using the following PowerShell script :

SELECT TOP 1 [tp_SiteID],[tp_Login] FROM [UserInfo] WITH (NOLOCK) WHERE tp_IsActive = 1 AND tp_SiteAdmin = 1 AND tp_Deleted = 0 and tp_Login not LIKE 'i:%'

Powershell script
clear
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
Function Run-SQLScript($SQLServer, $SQLDatabase, $SQLQuery)
{
    $ConnectionString = "Server =" + $SQLServer + "; Database =" + $SQLDatabase + "; Integrated Security = True"
    $Connection = new-object system.data.SqlClient.SQLConnection($ConnectionString)
    $Command = new-object system.data.sqlclient.sqlcommand($SQLQuery,$Connection)
    $Connection.Open()
    $Adapter = New-Object System.Data.sqlclient.sqlDataAdapter $Command
    $Dataset = New-Object System.Data.DataSet
    $Adapter.Fill($Dataset) 
    $Connection.Close()
    $Dataset.Tables[0]
}

#Define configuration parameters
$Server="MSNWQSQSP2013"
$Database="WSS_Content_RecallsTest"
$SetupFile="Features\ReportServer\ReportViewer.dwp"


#Query SQL Server content Database to get information about the MissingFiles

$Query = "SELECT TOP 1 [tp_SiteID],[tp_Login] FROM [UserInfo] WITH (NOLOCK) WHERE tp_IsActive = 1 AND tp_SiteAdmin = 1 AND tp_Deleted = 0 and tp_Login not LIKE 'i:%'"

$QueryResults = @(Run-SQLScript -SQLServer $Server -SQLDatabase $Database -SQLQuery $Query )
 Write-Host "column count = " $QueryResults[1].Table[0].Columns[0]

#Iterate through results

foreach ($Result in $QueryResults){
        
         write-Host $Result[0]; 
         write-Host $Result[1]; 
        
 
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *