[Discovery] [Bug] on V4.0.2 ORA-00911

[Discovery] [Bug] on V4.0.2 ORA-00911

  
Forge Component
(55)
Published on 30 Nov (2 weeks ago) by João Rafael Capucha
55 votes
Published on 30 Nov (2 weeks ago) by João Rafael Capucha

There is a bug on the advance query CreateReferencesOracle for the ones using the Oracle database as a result you can not create snapshot after upgrading to this version.

ORA-00911: invalid character
Error in advanced query CreateReferencesOracle in SnapShot_Create in SnapShot in DiscoveryProbe (INSERT @Hint INTO {Reference} ({Reference}.[SnapShotId], {Reference}.[SourceModuleNodeId], {Reference}.[TargetElementNodeId], {Reference}.[IsRecent]) SELECT @SnapShotId, SourceModule.Id, {ElementNode}.[Id], @IsRecentDefault FROM ( SELECT DISTINCT espace.ss_key, e_reference.RefSSKey, e_reference.Producer_SS_Key FROM ( SELECT {Espace_Reference}.[SS_Key] as RefSSKey, {Espace_Reference}.[Producer_SS_Key], {Espace_Reference}.[Consumer_Version_Id] FROM {Espace_Reference} WHERE {Espace_Reference}.[Consumer_Version_Id] in ( SELECT {Espace}.[Version_Id] FROM {Espace} WHERE {Espace}.[Is_Active] = @TrueBooleanFlag)) e_reference INNER JOIN (SELECT {Espace}.[SS_Key], {Espace}.[Version_Id] FROM {Espace} WHERE {Espace}.[Is_Active]= @TrueBooleanFlag) espace ON e_reference.Consumer_Version_Id= espace.[Version_Id] ) EspaceRef JOIN {ModuleNode} SourceModule ON SourceModule.[SSKey] = EspaceRef.[SS_Key] AND SourceModule.[Kind]=‘oml’ AND SourceModule.[SnapS ...): ORA-00911: invalid character

By replacing the curly quotation marks on the string literal ‘oml’ to straight quotation marks 'oml' should fix this problem. 

Solution

Thanks @Robin Kouwen, you're totally correct!

For the Oracle Users:

I changed in eSpace: DiscoveryProbe, action Snapshot_Create, Advanced Query: CreateReferencesOracle


Change this join:

JOIN {ModuleNode} SourceModule ON SourceModule.[SSKey] = EspaceRef.[SS_Key] AND SourceModule.[Kind]=‘oml’ AND SourceModule.[SnapShotId] = @SnapShotId

for this:

JOIN {ModuleNode} SourceModule ON SourceModule.[SSKey] = EspaceRef.[SS_Key] AND SourceModule.[Kind]='oml' AND SourceModule.[SnapShotId] = @SnapShotId


Discovery version: v4.0.2

for Outsystems 10

Solution