Error publishing: the database is not defined for the following Foreign Entity

Error publishing: the database is not defined for the following Foreign Entity

  

I am trying to publish an espace with a query that has inside a table (VIEW) from an extension.

"cand_main" is the name of the view


It says "In the query 'xxxxs' the database is not defined for the following Foreign Entity: 'cand_main'"

Hi Filipe,

Did you import the view via Integration Studio?

Menno

Yes

Hi Filipe,

It might have to do with access rights on the database you are trying to query.

When you do "view data" on the table in Service Studio, does it result in the same error?

You could also check which user you use in de database connection for the database and try to query with that user through another tool and test if that works.

Menno

When you do "view data" on the table in Service Studio, does it result in the same error?

I cant view data because it tells me that i must publish before.

You could also check which user you use in de database connection for the database and try to query with that user through another tool and test if that works.

I can see the data in mysqlWorkBench tool .

Also:

Notice that the view uses different databases inside and another two views since i cant have subqueries in one view

Changing the query i could publish but when passes by or testing the query it displays the followingmessage

You say:

"Notice that the view uses different databases inside and another two views since i cant have subqueries in one view"

My guess is that the user "osruntime" doesn't have access to the under laying tables/views that are used in the view. Do you use linked servers/database links in your view to query the data? If you do, then that's a not so good pattern to use. It can lead to performance issues and if the other databases are not accessible for some reason, you're query results in errors.

BTW, Did you logon in MySQLWorkbench as the "osruntime" user? Because with that user you should try to execute the query.

Menno

Hi there,

I experience the same. What is the solution. I can manage dependency the dbextension.xif in my module, but when try to use the external entity that error shows up:

But the entity is already in the extension.

I have grant the osruntime to the underlying table as well. I try the cloud environment to call the external db, is it allowed? When i try the connection, it works; when i manage dependency, it works, unluckily when i use its entity, it is error.


Already solved:

1. i miss the configuration in service center:

2. In the Integration studio, i change the default Table/View name from "schema"."tes" to just TES (without quotes) and then manage dependency again:


regards,

MiP