[ServiceStudio] Display physical database table name for a given entity.

By Robert Chanphakeo on 29 Aug 2011
Sometimes you might want to verify if the correct data has been inserted into a table, or would like to insert records into a table manually. It be good to know the physical name of a given entity.
Kilian Hekhuis31 Aug 2011
There's the sqlmap eSpace that you could use, don't know if it is downloadable somewhere. Also, you can use this query:

select * from ossys_Entity where name = @logicaltablename

to find a table's physical name (although of course there may be more than one result, as each eSpace could define the same logical table name).

I think the biggest problem with this request is that Service Studio may not be aware of the physical table names at all, since the compiler produces them.

Goncalo Borrega16 Oct 2011
This can be achieved by querying the metadata API/entities. Physical_Table_Name attribute on the Entity entity provies you that value.
Kilian Hekhuis17 Oct 2011
Goncalo, what's this metadata API you mentioned?
Goncalo Borrega17 Oct 2011
Go to Add/Remove references and under the (System) producer you can find a lot of the metamodel of the platform.
These entities can be referenced just as any other and queries can be performed on them.

This way you are able to know most of the underlying information for what is produced by the platform.

Kilian Hekhuis17 Oct 2011
Thanks, this is quite useful.