Export TM

Hey

We've replaced our very old GS 2017 (GS: 14.2.32756.8 - SR1 CU8) by a new GS2020. Almost all data was exported and imported and everything worked fine - except one language pair in one TM. I cannot export it. I get the following error:

Error: System - Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. (details: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. bei Sdl.LanguagePlatform.TranslationMemoryImpl.TokenSerialization.TokenDeserializer.ReadTagToken(TokenType tokenType, Boolean tokenHasStandardPlacement, Token previousToken, Boolean tokenIsSingleChar) bei Sdl.LanguagePlatform.TranslationMemoryImpl.TokenSerialization.TokenDeserializer.Deserialize() bei Sdl.LanguagePlatform.TranslationMemoryImpl.TokenSerialization.LoadTokens(Byte[] data, Segment segment) bei Sdl.LanguagePlatform.TranslationMemoryImpl.ResourceManager.GetTranslationUnit(TranslationUnit storageTu, FieldDefinitions fields, CultureInfo sourceCulture, CultureInfo targetCulture) bei Sdl.LanguagePlatform.TranslationMemoryImpl.TranslationUnitServerFilteringStrategy.Sdl.LanguagePlatform.TranslationMemoryImpl.ITranslationUnitFilteringStrategy.GetTusFiltered(PersistentObjectToken translationMemoryId, RegularIterator iter, FieldDefinitions fieldDefinitions, Boolean includeContextContent, TextContextMatchType textContextMatchType, CultureInfo sourceCulture, CultureInfo targetCulture, Boolean usesIdContextMatch) bei Sdl.LanguagePlatform.TranslationMemoryImpl.ResourceManager.GetTranslationUnitsWithContextContent(PersistentObjectToken tmId, RegularIterator iter, TextContextMatchType textContextMatchType, CultureInfo sourceCulture, CultureInfo targetCulture, Boolean usesIdContextMatch) bei Sdl.LanguagePlatform.TranslationMemoryImpl.API.GetTranslationUnitsWithContextContent(Container container, PersistentObjectToken tmId, RegularIterator& iter))

Does anyone have a solution for this? It's not a big TM - i exported (and imported) much bigger without problems.

Thank you for your help!

emoji
Parents
  • Hi Guy!

    I've had similar issues in the past, and technical support has provided me with a script to run on the TMService database (I can't seem to attach a file, so I've included the code below; you should be able to copy-paste it into any text application and save it with an .sql extension). Please note that the following 3 values in the script need to be edited before you run it:

    - "set @systemDBName = 'TMService'": replace 'TMService' with the actual name of your TMService database, which may or may not be different.
    - "set @tmname = "'Co-op Pay'": replace 'Co-op Pay' with the name of the affected TM.
    - "set @lang = 'en-CA_fr-CA'": replace 'en-CA_fr-CA' with the problematic language pair.

    After running the script, re-index the TM.

    Hope this helps!

    Christine



    /****** 
    
    Script for clearing token data from a TM-S TM, if data corruption has occurred that is preventing TUs from loading.
    
    Can be used when TM-S system database and containers are on same sql server.
    
    Edit the values of @systemDBName, @tmname and @lang below so they refer to the TM language direction in question.
    
    ******/
    
    declare @tmname varchar(200)
    declare @lang varchar(200)
    declare @systemDBName varchar(200)
    
    /****** 
    Edit the values of these variables before running the script.
    ******/
    set @systemDBName = 'TMService'
    set @tmname = 'Co-op Pay'
    set @lang = 'en-CA_fr-CA'
    
    /****** 
    
    ******/
    declare @cmd varchar(200)
    declare @tmid varchar(200), @contid varchar(200)
    
    print(' -- Running token-data-clearing script for TM [' + @tmname + '] in system DB [' + @systemDBName + '], language direction ' + @lang)
    
    print('creating temporary tables')
    IF OBJECT_ID(N'tempdb..#Temp') IS NOT NULL
    BEGIN
    DROP TABLE #Temp
    END
    
    CREATE TABLE #temp (id INT)
    
    IF OBJECT_ID(N'tempdb..#Temp2') IS NOT NULL
    BEGIN
    DROP TABLE #Temp2
    END
    
    CREATE TABLE #temp2 (val1 varchar(200), val2 varchar(200))
    
    set @cmd = 'insert into #temp2 select [TranslationMemoryId], [ContainerId] FROM [' + @systemDBName + '].[dbo].[TranslationMemory] where name = ''' + @tmname + ''''
    
    print ('retrieving TMID and ContainerID')
    exec (@cmd)
    select @tmid = val1, @contid = val2 from #temp2
    print('TMID is ' + @tmid + ' , ContainerID is ' + @contid)
    
    declare @contname varchar(200)
    
    print ('retrieving Container Name')
    set @cmd = 'insert into #temp2 select [ContainerName], null FROM [' + @systemDBName + '].[dbo].[Container] where ContainerId = ''' + @contid + ''''
    
    delete from #temp2
    exec(@cmd)
    
    select @contname = val1 from #temp2
    
    print ('Container name is ' + @contname)
    
    set @tmid = @tmid + '|' + @lang + '|' + @tmname
    
    print ('retrieving TM integer ID in Container')
    set @cmd = 'insert into #temp select id from [' + @contname + '].[dbo].[translation_memories] where lower(name) = lower(''' + @tmid + ''')'
    
    exec (@cmd)
    
    declare @id integer
    select @id = id from #temp
    
    print ('ID is ' + +cast( @id as varchar(20)))
    
    set @cmd = 'update [' + @contname + '].[dbo].[translation_units_' +cast( @id as varchar(20)) + '] set source_token_data = null, target_token_data = null'
    
    print('clearing token data for table with this cmd:')
    print(@cmd)
    
    exec( @cmd)
    
    print('done')
    

    emoji
Reply
  • Hi Guy!

    I've had similar issues in the past, and technical support has provided me with a script to run on the TMService database (I can't seem to attach a file, so I've included the code below; you should be able to copy-paste it into any text application and save it with an .sql extension). Please note that the following 3 values in the script need to be edited before you run it:

    - "set @systemDBName = 'TMService'": replace 'TMService' with the actual name of your TMService database, which may or may not be different.
    - "set @tmname = "'Co-op Pay'": replace 'Co-op Pay' with the name of the affected TM.
    - "set @lang = 'en-CA_fr-CA'": replace 'en-CA_fr-CA' with the problematic language pair.

    After running the script, re-index the TM.

    Hope this helps!

    Christine



    /****** 
    
    Script for clearing token data from a TM-S TM, if data corruption has occurred that is preventing TUs from loading.
    
    Can be used when TM-S system database and containers are on same sql server.
    
    Edit the values of @systemDBName, @tmname and @lang below so they refer to the TM language direction in question.
    
    ******/
    
    declare @tmname varchar(200)
    declare @lang varchar(200)
    declare @systemDBName varchar(200)
    
    /****** 
    Edit the values of these variables before running the script.
    ******/
    set @systemDBName = 'TMService'
    set @tmname = 'Co-op Pay'
    set @lang = 'en-CA_fr-CA'
    
    /****** 
    
    ******/
    declare @cmd varchar(200)
    declare @tmid varchar(200), @contid varchar(200)
    
    print(' -- Running token-data-clearing script for TM [' + @tmname + '] in system DB [' + @systemDBName + '], language direction ' + @lang)
    
    print('creating temporary tables')
    IF OBJECT_ID(N'tempdb..#Temp') IS NOT NULL
    BEGIN
    DROP TABLE #Temp
    END
    
    CREATE TABLE #temp (id INT)
    
    IF OBJECT_ID(N'tempdb..#Temp2') IS NOT NULL
    BEGIN
    DROP TABLE #Temp2
    END
    
    CREATE TABLE #temp2 (val1 varchar(200), val2 varchar(200))
    
    set @cmd = 'insert into #temp2 select [TranslationMemoryId], [ContainerId] FROM [' + @systemDBName + '].[dbo].[TranslationMemory] where name = ''' + @tmname + ''''
    
    print ('retrieving TMID and ContainerID')
    exec (@cmd)
    select @tmid = val1, @contid = val2 from #temp2
    print('TMID is ' + @tmid + ' , ContainerID is ' + @contid)
    
    declare @contname varchar(200)
    
    print ('retrieving Container Name')
    set @cmd = 'insert into #temp2 select [ContainerName], null FROM [' + @systemDBName + '].[dbo].[Container] where ContainerId = ''' + @contid + ''''
    
    delete from #temp2
    exec(@cmd)
    
    select @contname = val1 from #temp2
    
    print ('Container name is ' + @contname)
    
    set @tmid = @tmid + '|' + @lang + '|' + @tmname
    
    print ('retrieving TM integer ID in Container')
    set @cmd = 'insert into #temp select id from [' + @contname + '].[dbo].[translation_memories] where lower(name) = lower(''' + @tmid + ''')'
    
    exec (@cmd)
    
    declare @id integer
    select @id = id from #temp
    
    print ('ID is ' + +cast( @id as varchar(20)))
    
    set @cmd = 'update [' + @contname + '].[dbo].[translation_units_' +cast( @id as varchar(20)) + '] set source_token_data = null, target_token_data = null'
    
    print('clearing token data for table with this cmd:')
    print(@cmd)
    
    exec( @cmd)
    
    print('done')
    

    emoji
Children
No Data