Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Saradhi Motamarri asked where the dbaccess Connection menu gets its list of servers. Paul Watson and Khaled Bentebal said it reads the sqlhosts file (or the one named by INFORMIXSQLHOSTS). Art Kagel suggested SELECT * FROM sysmaster:syssqlhosts; Khaled noted the menu does not use that, but Art said the query is easier for getting the same information. Answered.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Saradhi Motamarri — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi All,
In dbaccess when we traverse to 'Connection' tab, it lists a set of Informix Servers available.
From where does dbaccess picks up this available servers?
#Informix
↪ replying to Saradhi Motamarri
Paul Watson — source: IBM Community (ConnectedCommunity.org) Informix forum
AFAIR sqlhosts
Paul Watson
Oninit LLC
+1-913-387-7529
www.oninit.com
Oninit® is a registered trademark of Oninit LLC
↪ replying to Saradhi Motamarri
khaled Bentebal — source: IBM Community (ConnectedCommunity.org) Informix forum
It reads the sqlhosts file in the etc directory or the file indicated in
the $INFORMIXSQLHOSTS environment variable if that is set
--
Cordialement, Regards,
Khaled Bentebal
Email:
khaled.bentebal@consult-ix.fr
Site Web:
www.consult-ix.fr
↪ replying to Saradhi Motamarri
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
Saradhi:
SELECT * FROM sysmaster:syssqlhosts;Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog:
http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
↪ replying to Art Kagel
Saradhi Motamarri — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi Paul, Khaled and Art,
Thank you.
↪ replying to Art Kagel
khaled Bentebal — source: IBM Community (ConnectedCommunity.org) Informix forum
Art:
The Connection menu option of dbaccess does not use the query:
SELECT * FROM sysmaster:syssqlhosts;The connection menu option uses the sqlhosts file since there is no connection yet at that point. Once you establish a connection(SID and TID), you can use an SQL query that will be analyzed by the sqlexec parser.
You need to first have a session in the SCB and a thread in the TCB in order for the sqlexec thread to execute an SQL instruction. The connection menu option always reads the sqlhosts file directly. Even if you do not have the sysmaster:syssqlhosts pseudo table (possible sometimes if the sysmaster is not there), the connection menu option works and lists the contents of the sqlhosts file.
It is true that the
SELECT * FROM sysmaster:syssqlhosts;reads the contents of the sqlhosts file after the connection is performed
-- Khaled Bentebal Email:
khaled.bentebal@consult-ix.fr
Site Web:
www.consult-ix.fr
↪ replying to khaled Bentebal
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
Khaled:
Your point in valid and well taken, dbaccess menus do not use sysmaster but read in sqlhosts file itself. However, I think that Saradhi's question went to how he could get the same information and it is far easier to read sysmaster:syssqlhosts than to parse the file directly.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog:
http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.