1

I have migrated PWA instance to new servers. When I try to run upgrade state it shows following error.

Upgrade session failed due to unexpected exception: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'. at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.<>c__DisplayClass13.b__12(SqlDataReader reader) at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.ProcessSqlReader(String monitoredScopeName, String sqlCommandText, Action1 processRowAction) at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.GetStoredProceduresFromTargetDatabase() at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.<>c__DisplayClass7.<Initialize>b__2() at System.Threading.Tasks.Parallel.<>c__DisplayClassf1.b__c() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass11.b__10(Object param0) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, Action1 body) at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.Initialize() at Microsoft.Office.Project.Server.Upgrade.SqlMetadataManager.InitializeObjectsFromTargetDatabase() at System.Threading.Tasks.Parallel.<>c__DisplayClassf1.b__c() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass11.b__10(Object param0) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, Action1 body) at Microsoft.Office.Project.Server.Upgrade.SqlMetadataManager.Initialize() at Microsoft.Office.Project.Server.Upgrade.PSDatabaseSequence.RefreshSqlObjects() at Microsoft.Office.Project.Server.Upgrade.PSDatabaseSequence.PostUpgrade() at Microsoft.SharePoint.Upgrade.SPUpgradeSession.Upgrade(Object o, Boolean bRecurse) at Microsoft.SharePoint.Administration.SPPersistedUpgradableObject.Upgrade(Boolean recursively) at Microsoft.SharePoint.Administration.SPDatabase.Upgrade(Boolean recursively) at Microsoft.SharePoint.Upgrade.SPManager.RunUpgradeSession(Object lockObject, IUpgradable iup, SPUpgradeOperationFlags upgradeOperationFlags) ---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'. at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.<>c__DisplayClass13.<GetStoredProceduresFromTargetDatabase>b__12(SqlDataReader reader) at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.ProcessSqlReader(String monitoredScopeName, String sqlCommandText, Action1 processRowAction) at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.GetStoredProceduresFromTargetDatabase() at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.<>c__DisplayClass7.b__2() at System.Threading.Tasks.Parallel.<>c__DisplayClassf1.<ForWorker>b__c() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, Action1 body) at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.Initialize() at Microsoft.Office.Project.Server.Upgrade.SqlMetadataManager.InitializeObjectsFromTargetDatabase() at System.Threading.Tasks.Parallel.<>c__DisplayClassf1.<ForWorker>b__c() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0) ---> (Inner Exception #0) System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'. at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.<>c__DisplayClass13.<GetStoredProceduresFromTargetDatabase>b__12(SqlDataReader reader) at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.ProcessSqlReader(String monitoredScopeName, String sqlCommandText, Action1 processRowAction) at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.GetStoredProceduresFromTargetDatabase() at Microsoft.Office.Project.Server.Upgrade.TargetDatabaseObjectProvider.<>c__DisplayClass7.b__2() at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.b__c() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass11.b__10(Object param0)<--- <--- . e8e3827b-77f9-4003-bbe8-c64d7a989dfe 06/10/2016 15:21:26.71 powershell (0x1C80) 0x1844 SharePoint Foundation Upgrade SPUpgradeSession ajxl4 INFO ====================================================================================== e8e3827b-77f9-4003-bbe8-c64d7a989dfe

No clue what is going wrong here.

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.