Upgrade from CMS 9 to CMS 10 but you get an error upgrading the database:
Update-EPiDatabase -Verbose:$true
C:\..\packages\EPiServer.Framework.10.10.4\tools\epideploy.exe -a sql -s C:\..\.. -p C:\..\packages\EPiServer.CMS.Core.10.10.4\tools\epiupdates\* -c EPiServerDB
Found location C:\..\packages\EPiServer.CMS.Core.10.10.4\tools\epiupdates\config with 0 files of type Sql
Processing C:\..\packages\EPiServer.CMS.Core.10.10.4\tools\epiupdates\sql\7.8.0.sql
Script validation: 0 - Already correct database version
...
Processing C:\..\packages\EPiServer.CMS.Core.10.10.4\tools\epiupdates\sql\10.3.0.sql
Script validation: 1 - Upgrading database
Running script 10.3.0.sql
epideploy.exe :
At C:\..\packages\EPiServer.Framework.10.10.4\tools\upgrade.psm1:310 char:3
+ &$epiDeployPath -a $action -s $sitePath -p $updatePath\* -c ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
EPiDeploy was stopped due to an exception, more details:
System.Data.SqlClient.SqlException (0x80131904): Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery
is used as an expression.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache,
Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at EPiDeploy.Sql.ScriptRunner.<>c__DisplayClass5.<ExecuteScript>b__3()
at EPiDeploy.Sql.DatabaseHandler.Execute[T](Func`1 f, Boolean commit)
at EPiDeploy.Sql.ScriptRunner.ExecuteScript(StreamReader stream)
at EPiDeploy.Sql.ScriptRunner.ExecuteScripts(IEnumerable`1 files, Boolean requiresValidation)
at EPiDeploy.Sql.ScriptRunner.<>c__DisplayClass1.<Execute>b__0()
at E
PiDeploy.Sql.DatabaseHandler.Execute[T](Func`1 f, Boolean commit)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at
EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Common.Executor.Execute(ILocation location)
at EPiDeploy.Deploy.Execute(Options options, ILocation startPosition)
at EPiDeploy.Deploy.Run(Options options)
at EPiDeploy.Program.Main(String[] args)
ClientConnectionId:f553f77b-94d3-4f08-8e44-839bc6eabf00
Error Number:512,State:1,Class:16
Suggestion 1:
A similar issue with some suggestions https://world.episerver.com/blogs/Henrik-Fransas/Dates/2014/4/The-danger-of-renaming-contentypes-and-how-to-fix-it/
Suggestion 2:
Execute 10.3.0.sql manually and set debug in SQL Management Studio. According to the error message the script should be in this directory C:\..\packages\EPiServer.CMS.Core.10.10.4\tools\epiupdates\sql\.
Steps:
1. Open SQL management studio
2. Choose File menu
3. Choose Open File
4. Choose the file in the directory:
(C:\..\packages\EPiServer.CMS.Core.10.10.4\tools\epiupdates\sql\10.3.0.sql)
5. Choose your database
6. Press Debug button (the one that is next to Execute button).
Conclusion: It seems that the problem is that there are multiple entries in tblScheduledItem for the Episerver tasks such as ‘Automatic Emptying of Trash’ as per below. Tide this up and get back to a single and correct item. Look in the tables tblScheduledItem and tblScheduledItemLog.
Run this query to delete duplicate scheduled jobs (this is an example):
delete from tblScheduledItemLog where fkScheduledItemId ='9550334C-CDDA-4222-94A1-60DCB1822CDB'
delete from tblScheduledItem where pkID='9550334C-CDDA-4222-94A1-60DCB1822CDB'
Comments
0 comments
Please sign in to leave a comment.