How to fix: Sequence Contains more than one element.....Schema Compare for Oracle

Have issue that is stopping comparisons...Sequence Contains more than one element.
Tagged:

Answers

  • RichardLRichardL Posts: 417 Gold 4
    Hi @Albie

    Thanks for your post. 

    If you have a support contract or have a trial serial key then you can send us a ticket so that a product specialist can look in to your issue for you. 

    I hope this helps. 

    Richard Lynch. 
    Customer Support
    Redgate Software
  • DeepakUDeepakU Posts: 3 New member
    Facing same issue at my end: 

    Programmable Objects from comparison information: Sequence contains more than one element
    Data = System.Collections.ListDictionaryInternal
    InnerException = System.InvalidOperationException: Sequence contains more than one element
       at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
       at RedGate.Versioning.Engine.Core.ScriptGeneration.SqlServer.Modification.ReRunnable.RerunnableExtendedPropertiesFixer.BatchIsIfExistsCheck(TSqlBatch batch, IList`1& parameters)
       at RedGate.Versioning.Engine.Core.ScriptGeneration.SqlServer.Modification.ReRunnable.RerunnableExtendedPropertiesFixer.FixExtendedPropertiesRewrites(IWork work, IComparisonInformation comparisonInformation, SqlServerComparisonSettings comparisonSettings, IReadOnlyCollection`1 filesToAlter)
       at RedGate.Versioning.Engine.Core.ScriptGeneration.SqlServer.Modification.ReRunnable.RerunnableExtendedPropertiesFixer.FixExtendedPropertiesRewrites(IWork work, IComparisonInformation comparisonInformation, IComparisonSettings comparisonSettings, IReadOnlyCollection`1 filesToAlter)
       at RedGate.Versioning.Engine.Core.ScriptGeneration.SqlServer.Synchronization.Folder.ScriptFolderSynchronizer.SynchronizeFolder(IComparisonInformation comparisonInformation, FolderSynchronizationSettings folderSynchronizationSettings, IComparisonSettings comparisonSettings, IProgressLogger progress)
       at RedGate.Versioning.Engine.Core.ScriptGeneration.SqlServer.Synchronization.Folder.ScriptFolderSynchronizer.<>c__DisplayClass9_0.<SynchronizeFolderFromDifferences>b__0()
       at RedGate.Versioning.Engine.Core.ScriptGeneration.SqlServer.Synchronization.Folder.ScriptFolderSynchronizer.HandleExceptions(String destinationFolder, Func`1 callback)
    TargetSite = System.Collections.Generic.IReadOnlyCollection`1[RedGate.Versioning.Engine.Core.ScriptGeneration.Synchronization.Folder.SynchronizedFile] HandleExceptions(System.String, System.Func`1[System.Collections.Generic.IReadOnlyCollection`1[RedGate.Versioning.Engine.Core.ScriptGeneration.Synchronization.Folder.SynchronizedFile]])
    StackTrace =    at RedGate.Versioning.Engine.Core.ScriptGeneration.SqlServer.Synchronization.Folder.ScriptFolderSynchronizer.HandleExceptions(String destinationFolder, Func`1 callback)
       at RedGate.Versioning.Engine.Core.ScriptGeneration.SqlServer.Synchronization.Folder.ScriptFolderSynchronizer.SynchronizeFolderFromDifferences(IComparisonInformation comparisonInformation, IEnumerable`1 differenceIdentifiers, FolderSynchronizationSettings folderSynchronizationSettings, IComparisonSettings comparisonSettings, IProgressLogger progress)
       at RedGate.Versioning.Engines.Interaction.GenerateMigrations.ProgrammableObjects.ProgrammableObjectSynchronizer`1.<>c__DisplayClass7_0.<SyncSpecificProgrammableObjects>b__0(IComparisonInformation schemaDifferences)
       at RedGate.Versioning.Engine.Core.ScriptGeneration.Synchronization.Folder.ScriptFolderComparerAndSynchronizer`1.<SyncDatabaseWithFolder>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at RedGate.Versioning.Engine.Core.ScriptGeneration.Synchronization.Folder.RerunnableScriptFolderComparerAndSynchronizer`1.<SyncDatabaseWithFolder>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at RedGate.Versioning.Engines.Interaction.GenerateMigrations.ProgrammableObjects.ProgrammableObjectSynchronizer`1.<SyncSpecificProgrammableObjects>d__7.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at RedGate.Versioning.Engines.Interaction.GenerateMigrations.Imports.ScriptGenerator`1.<GenerateScripts>d__4.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at RedGate.Versioning.Engines.Interaction.GenerateMigrations.Imports.SchemaModelAwareScriptGenerator.<GenerateScripts>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at RedGate.Versioning.Engines.Interaction.GenerateMigrations.Imports.ProjectScriptGenerator.<GenerateScripts>d__10.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at RedGate.Versioning.Engines.Interaction.GenerateMigrations.Imports.ProjectScriptGeneratorAndImporter.<CreateScripts>d__11.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at RedGate.Versioning.Engines.Interaction.GenerateMigrations.Imports.ProjectScriptsCreator.<CreateScripts>d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at RedGate.Versioning.Client.VsShell.VisualStudio.Commands.SyncCommand.<Synchronize>d__31.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at RedGate.Versioning.Client.VsShell.VisualStudio.Commands.SyncCommand.<ExecuteOrThrow>d__23.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at RedGate.Versioning.Client.VsShell.VisualStudio.Commands.SyncCommand.<Execute>d__22.MoveNext()
    HelpLink = 
    Source = RedGate.Versioning.Engine.Core.ScriptGeneration.SqlServer
    HResult = -2146233088
  • jreccajrecca Posts: 7 Bronze 1
    edited October 29, 2021 7:56PM
    (Sorry, I just noticed that this forum is for Oracle, I will repost in SQL Products forum)

    I'm also having the same issue here:

    Message = Error updating scripts in folder G:\Devel\Projects\VS2017\iFastrack_Sql_Deploy-Test\iFastrack_Sql_Deploy\Programmable Objects from comparison information: Sequence contains more than one element
    Data = System.Collections.ListDictionaryInternal

    So far it seems to happen when I change a view, I can add a new one but not update it.
  • BetterEnergyBetterEnergy Posts: 2 New member
    Same issue comparing two databases in SQL Server on Azure
  • BetterEnergyBetterEnergy Posts: 2 New member
    Interesting post, it appears that sql compare and other tool are using the same database access layer (strategy pattern)
Sign In or Register to comment.