The process cannot access the file 'WorldServer.ldb' because it is being used by another process occurs while opening WSXZ package in Studio

Symptoms/context:

Unable to open WSXZ package in SDL Trados Studio 2015/2017 with the following error message
  
The process cannot access the file 'WorldServer.ldb' because it is being used by another process
 
Root Cause:
Term Database attributes with different "Internal (API) Name" but same "External (UI) Name" are created for TD Entry and TD Term on WorldServer side creating a duplicate that is not "tolerated" by Multiterm. This cases the conversion of the TBX file inside the package to *.sdltb format to fail while opening the package in SDL Trados Stdio
 
Resolution:

Main resolution to be applied in WorldServer:

This resolution explains how to fix the actual root cause of the issue in WorldServer to prevent the problem to happen again.
Duplicated External (UI) Name and/or Internal (UI) Name for the Applicable Object Types TD Entry and TD Term should be avoided. Note that WorldServer currently allows such duplicates in two different Applicable Object Types. However: this causes issues for SDL Trados Studio since the Termbase definition resulting from such duplicates is not supported in Studio or SDL Multiterm. This is why SDL Trados Studio cannot open a package including a Termbase with such TermBase definition.
 

  1. In WorldServer, go to Management > Administration > Customization
  2. Next to Custom component Type, in the drop-down menu, select Attributes
  3. Search for attributes of Applicable Object Types TD Entry and TD Term and check for duplicate Internal or External Name
  4. If you find one or more duplicate, rename one of the two names sligly, for instance by adding a "_" to the name
  5. Once this is done, re-export the affected project or task and open the WSXZ package in SDL trados studio
  6. If the error appears again, you might have missed a duplicate attribute. Check again and repeat the process until the exported WSXZ package can be opened.


Workaround #1 to be able to open the WSXZ package quickly if required:

  1. Change the WorldServer package file extension from *.wsxz to *.zip.
  2. Extract the file
  3. Remove the TBX and the XCS files
  4. ZIP the content and rename it to *.wsxz
  5. Open it in SDL Trados Studio.

IMPORTANT: be aware that when applying this workaround, you will remove the Term Database entirely from the package. The Studio project created out of the changed package will not contain any Termbase.

After removing the Term Database from the package, you can convert the TBX file inside the exported package to a SDLTB (Multiterm format) Term Database and associate it with the WorldServer Studio project via Project Settings. You need SDL Multiterm Desktop to be installed on your computer to apply this procedure. Follow the steps described in this article:

How to convert a TBX file from a WSXZ package to SDLTB format to be used in SDL trados Studio

Workaround #2

This workaround explains how to fix the WSXZ Studio package by keeping the Term Database. Note: this is quite technical, time consuming and not always easy to apply:

1. Change the WorldServer package file extension from *.wsxz to *.zip.
2. Extract the file.
3. Open xcs.xml file on any text editor.
4. Find the element ' termNoteSpec name ' and 'descripSpec name ', you will see that the value of their dataCatId is the same. For instance  'Term Context' or 'Business Area'. 
Note that the element name or type and the dataCatID may vary. What is relevant is that the dataCatID is duplicated.

Here are 2 examples:

termNoteSpec name='termContext' dataCatId='Term Context',
descripSpec name='Term_Context' dataCatId='Term Context'

termNoteSpec name='businessArea' dataCatId='Business Area'
descripSpec name='Business_Area' dataCatId='Business Area'.

5. Change every occurrence of a value of the above elements' attribute 'dataCatId' to any different name, for instance ‘Term Context2’ or ‘Business Area2’.After the change, they will display like this:

termNoteSpec name='termContext' dataCatId='Term Context',
descripSpec name='Term_Context' dataCatId='Term Context2'

termNoteSpec name='businessArea' dataCatId='Business Area'
descripSpec name='Business_Area' dataCatId='Business Area2'.

6. Save and close the XCS file.
7. Compress all of the extracted files to a zip file.
8. Change the zip file name extension to *.wsxz.
9. Open it in Studio. It will open without error.

Please note that there is no need to revert those two elements' dataCatId value back to original state in order to upload the return package back to WorldServer since the Return package contains only the bilingual translated file and not Termbase file.

Reference:

If this happens with a WSXZ package containing Arabic as source or target language, please refer to the following article:

Error 'The process cannot access the file "WorldServer.ldb because it is being used by another process.' with Arabic as source or target language

Related