accessing another database on another machine
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I want to access a table on another database from another machine. What should I have ? We are running Informix 7.23 on both server running HP 10.20 both. As front end, we use I4GL 6.0. TIA, --garnadi
All you need to do is make sure that both servers are listed in each other's
sqlhosts files. Having done that you can use the appropriate parts of the
full ANSI SQL object naming to access the remote table:
"database owner".database@server:"table owner".table.column
The owners are only needed in a Mode ANSI database otherwise you could, for
example, join to a remote table thus:
SELECT *
FROM customers c,
transactions@other_server.orders o,
transactions@other_server.detail d
WHERE c.cust_id = o.cust_id
AND o.order_id = d.order_id;
Art S. Kagel
Garnadi wrote:
>
> I want to access a table on another database from another machine.
> What should I have ?
>
> We are running Informix 7.23 on both server running HP 10.20 both.
> As front end, we use I4GL 6.0.
>
> TIA,
>
> --garnadi
Art,
Don't you also need an entry in the /etc/services file?
Tom
"Art S. Kagel" wrote:
> All you need to do is make sure that both servers are listed in each other's
> sqlhosts files. Having done that you can use the appropriate parts of the
> full ANSI SQL object naming to access the remote table:
>
> "database owner".database@server:"table owner".table.column
>
> The owners are only needed in a Mode ANSI database otherwise you could, for
> example, join to a remote table thus:
>
> SELECT *
> FROM customers c,
> transactions@other_server.orders o,
> transactions@other_server.detail d
> WHERE c.cust_id = o.cust_id
> AND o.order_id = d.order_id;>
> Art S. Kagel
>
> Garnadi wrote:
> >
> > I want to access a table on another database from another machine.
> > What should I have ?
> >
> > We are running Informix 7.23 on both server running HP 10.20 both.
> > As front end, we use I4GL 6.0.
> >
> > TIA,
> >
> > --garnadi
Yes and /etc/hosts as well. I got side tracked and when I got back to
this one I just sent it out. Sorry folk.
Tom Grenier wrote:
>
> Art,
> Don't you also need an entry in the /etc/services file?
> Tom
>
> "Art S. Kagel" wrote:
>
> > All you need to do is make sure that both servers are listed in each other's
> > sqlhosts files. Having done that you can use the appropriate parts of the
> > full ANSI SQL object naming to access the remote table:
> >
> > "database owner".database@server:"table owner".table.column
> >
> > The owners are only needed in a Mode ANSI database otherwise you could, for
> > example, join to a remote table thus:
> >
> > SELECT *
> > FROM customers c,
> > transactions@other_server.orders o,
> > transactions@other_server.detail d
> > WHERE c.cust_id = o.cust_id
> > AND o.order_id = d.order_id;> >
> > Art S. Kagel
> >
> > Garnadi wrote:
> > >
> > > I want to access a table on another database from another machine.
> > > What should I have ?
> > >
> > > We are running Informix 7.23 on both server running HP 10.20 both.
> > > As front end, we use I4GL 6.0.
> > >
> > > TIA,
> > >
> > > --garnadi