Re: service portnumbers and multiple lan-adapters
Posted in 2000
Jan de Boer wrote:
>
> We're using IDS7.31 on HP-UX10.20 and we're trying to connect to one
> single databaseserver through multiple lan-adapters.The manuals are
> quite unspecific and unhelpfull. While working on this, we got more and
> more confused about how things are connected to each other
>
> We've identified three files that should have something to do with all
> of this
> ../informix/etc/onconfig.#
> ../informix/etc/sqlhosts
> /etc/services
>
> in the onconfig.# two variables are declared:
> DBSERVERNAME => and
> DBSERVERALIASES => Since "aliases" promises the possibility of multiplicity, we were
> wondering how these aliases should be separated from each other (for
> example comma delimited)?
I believe you can use either a comma (,) or a semi-colon (;), but
strictly NO SPACES.
> In sqlhosts there are four columns. We tried a few possiblities but to
> no avail. When push came to shove we were a little puzzeled about the
> meaning of each column (except for the second column of course).
> We interpreted these columns as follows:
> First column is the same as the service declared in /etc/services.
> Second column is the protocol used
> Third column as the name or alias of the different lan-adapters (the
> same as the one found in /etc/hosts)
> Fourth column as the DBSERVERNAME or aliases thereoff declared in
> onconfig.#
>
> Question is: are these assumptions correct?
Answer is: No. :-)
Column Contents
~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 DBSERVERNAME or DBSERVERALIASES (found in onconfig)
2 Protocol
3 Host name or IP (found in /etc/hosts)
4 Service name or socket No. (found in /etc/services)
5 Options
You just have columns 1 & 4 transposed. This is all in the manual BTW.
> Another question is: can the portnumbers in /etc/services be different
> for each adapter?
Yes, you need to set up a different port for each adapter. For optimum
performance you also need to create one DBSERVER name or alias for each
adapter, then create one line in your sqlhosts file for each. You should
then see a separate listener thread for each entry.
Don't forget to tune your NETTYPE parameter in onconfig as well.
> Even further, would it be possible to select different databases within
> a single databaseserver based on these portnumbers: thus restricting
> overall access to databases on a single databaseserver based on
> lanadapter-access?
No. However, you can control database access based on userid by granting
or revoking permissions to specific users.
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
| http://www.informix.com http://www.informixhandbook.com |///// / //|
| http://www.iiug.org +-----------------------------------+//// / ///|
| |This email will self-destruct in |/// / ////|
| |10 sec. If you received this email |// / /////|
| |in error, sorry about the mess. |/ ////////|
+----------------------+-----------------------------------+-----------+