RE: Are selects accross DB instances possible?
Posted in 2006
Tim
Yes, it is possible to write such a query, however the set
up of the instance is not how you describe. You cannot have
one onconfig file referencing two instances. You need two
onconfig files. The link between the servers is achieved
using the sqlhosts file, /etc/hosts (if on separate physical
servers) and /etc/services.
You sound as if you are trying to validate data across a
replicated table (using ER?). Here is generic SQL I use for
such a purpose (also the update):-
select 'columns' or 'count(*)'
or
insert into swedierrlog
select *
from database@server:table tab1
where not exists
( select lineno
from table
where pk_column = tab1.pk_column
)
Keith
-> -----Original Message-----
-> From: Tim [mailto:tim@mr-dog.net]
-> Sent: Monday, February 06, 2006 11:17 AM
-> To: informix-list@iiug.org
-> Subject: Are selects accross DB instances possible?
->
->
->
-> Hi,
->
-> 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?
->
-> Cheers,
->
-> Tim
-> _______________________________________________
-> Informix-list mailing list
-> Informix-list@iiug.org
-> http://www.iiug.org/mailman/listinfo/informix-list
->
**********************************************************************************
This message is sent in strict confidence for the addressee only. It may
contain legally privileged information. The contents are not to be disclosed
to anyone other than the addressee. Unauthorised recipients are requested
to preserve this confidentiality and to advise the sender immediately of any
error in transmission.
This footnote also confirms that this email message has been swept for the
presence of computer viruses, however we cannot guarantee that this message
is free from such problems.
**********************************************************************************