OS Tables with no PKs of Unknown Purpose, causing grief

OS Tables with no PKs of Unknown Purpose, causing grief

  

Hello - We have found that our solution has created a large number of tables over time that are not visible in Service Studio, but are clearly related to our solution. These tables do not have any primary keys defined, and as a result our database replication repair service cannot handle when replication fails. Also, there is no entry in the system entity table for any of these.

Here is a sampling:

OSEVT_1BW_BASEAP23

USR_7IG_LETTERSNOV21
USR_7IG_LETTERS_111716

OSUSR_KMC__MLQUEUECRI1

OSUSR_KVB__MLMENUITEM

OSUSR_8S4__MLSTATUSHIS

OSUSR_NMM__MLAPPLICAT5

OSUSR_ZBB_APPLIC15_111716


Why idea what these are, why they are created, and why they have no primary keys?

Hi Dan,

I'm suspicious as to whether some of them are created by the Platform, as they seem manual copies (like the one ending in "NOV21" - and I assume they start with "OSUSR", not "USR", otherwise they are certainly not OS-created tables, and "111716" which seem dates of a sort).

The tables with__ML however, are Platform-created tables, and if you check the contents it will show you they contain translations for Static Entities. For example, we have an Entity called "Origin" called "OSUSR_3W1_ORIGIN" that looks like this:

And a corresponding table "OSUSR_3W1__MLORIGIN" that looks like this:

These are joined in a view called OSUSR_3w1__MLORIGIN_lnl_NL, which looks like this:

SELECT     dbo.OSUSR_3W1_ORIGIN.ID, dbo.OSUSR_3W1__MLORIGIN.LABEL, dbo.OSUSR_3W1_ORIGIN.[ORDER]
FROM         dbo.OSUSR_3W1_ORIGIN INNER JOIN
                      dbo.OSUSR_3W1__MLORIGIN ON dbo.OSUSR_3W1__MLORIGIN.ID = dbo.OSUSR_3W1_ORIGIN.ID
WHERE     (dbo.OSUSR_3W1__MLORIGIN._LOCALE = 'nl-nl')

Which outputs this:

I'm not sure why there's no primary key set for the translations, I'm no DBA, but at least it explains what they are and why they are there.