Question

Is there any way to use a query and join two tables that is in two different database on the same server for DbVisualizer? I used the following for the SQL server

Select * from table union select * from datbase.dbo.table2

I tried this for the DbVisualizer, and it didnt work. How do I do this?

Was it helpful?

Solution

If the databases are in different servers you need to make sure that they are set up as linked servers.

Also be warned that the optimizer is relatively weak in this scenario, same server or not. The problem is that the statistics used for weighting costs of different operations aren't necessarily meaningful between different databases, especially at the point where the two databases will "intersect". So performance isn't what it could be.

OTHER TIPS

If DBVisualizer supports views, manually setup a view of table2 in your database.

create view table2 as  select * from database.dbo.table2

I dont think it can be done. I resolved the situation, by running a nightly data transfer to the SQL server. I do the union select from there...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top