I want to join two tables via two databases and connect them to each other via two database servers. I use as database "Informix" in version 14.10 and as sql client "DBeaver ".
My SQL statement looks like this:
SELECT column1
FROM databaseA@MyServer1:informix.tableA as A
INNER JOIN databaseB@MyServer2:informix.tableB as B on A.column1 = tableB.column1
WHERE column1 IN (10, 20)
I thought the SQL query is correct, however I get the following error message:
SQL Error [08004]: Socket connection to server (MyServer1, conerr=-25555, oserr=0) failed. Check your server is reachable from this client on the host:port specified.
I can access these two servers and its databases and tables.
Questions:
How can I check if my two servers are reachable from this client?
No port was specified by me. Do I need to specify a port in the SQL query and if so how do I do that?
I have found a solution to my problem. The mistake I made was that the database server name was not the correct one.
The server name in my case had to have a postfix '_tli'
and the name should then be myserver1_tli
.
How do I find out what the correct database server name is?
Now you should see a list of all databases on your database server. The server name is displayed after the @ sign. Example name_of_table@your_database_server_name
. So the database server name is your_database_server_name
.