Obnoxio The Clown wrote:
> Tim said:
>
>> Is it possible to perform a select with a sub-select to a different DB
>> instance? Eg.:
>>
>> select count(*)
>> from testdb@TESTDB_1_NET:table_on_db1 tdb1
>> where not tdb1.x in (
>> select tdb2.x
>> from testdb@TESTDB_2_NET:table_on_db2 tdb2);>>
>> Where onconfig contains both TESTDB_1_NET and TESTDB_2_NET using
>> onsoctcp connections to two different DB instances with an identical DB
>> replicated between them.
>>
>> Is this possible?
>>
>
> Why are you asking?
>
>
Hi!
Good question! I forgot to say!
I get the message:
'908: Attempt to connect to database server (testdb_2_net,
conerr=-25555, oserr=0) failed.
Error in line 2Near character position 44'
And after reading 'finderr -25555':
"-25555 Server server-name is not listed as a dbserver name in sqlhosts.
The database server name that is mentioned in the current command is
not listed in the sqlhosts file. Check the server name for accuracy.
Check that all database servers to be accessed are included in the
sqlhosts file."
I've checked these and they're ok, i.e., I can connect to both servers
successfully from either server:
echo "info tables;" | dbaccess testdb@TESTDB_1_NET -
and
echo "info tables;" | dbaccess testdb@TESTDB_2_NET -
both work.
My question is, is this a valid SQL request, or is it allowed that only
a single DB connection be used within a single select statement?
Cheers,
Tim
↪ replying to Tim Jones
It is a valid request. You make be able to connect to either instance
but try
dbaccess testdb@TESTDB_1_NET
choose Query->New and enter
database testdb@TESTDB_2_NET .
When you do this instance TESTDB_1_NET makes a connection on your
behalf to
instance TESTDB_2_NET.
Does the sqlhosts used by instance TESTDB_1_NET when it starts include
the
entries for TESTDB_2_NET? Is there and rhosts or hosts.equiv between
the 2 machines?