Re: Error occurs when oninit: DBSERVERNAME 'sharp' not in sqlhosts file.
Posted in 2006
A new Informix admin could start the server as user informix but could only connect to databases on one server (DB_INS1); attempts to reach DB_INS2 gave error 908 "Attempt to connect to database server failed. Invalid argument". Replies explained that each oninit starts a separate instance with its own ONCONFIG file, SERVERNUM and DBSERVERNAME/DBSERVERALIASES entries in sqlhosts, and that 908 often means a bad hostname in sqlhosts. The poster resolved it by setting ONCONFIG=onconfig.DB_INS2 to point at the second instance's config file.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Server Administration, Networking & sqlhosts Configuration
Superboer wrote:
> BTW i would start the database as user informix, not as root.
> there were some security problems in the past....
Thank you. The database server was started successfully as the informix
user on my machine.
The database was maintained by other people before, I am new to
informix administration. I have another problem. There is more than one
database/instance on the database server on my machine. Now some
database/instance (s) can be connected, but others can not. For
example, DB_INS1 can be connected, for example in dbaccess, but DB_INS2
can not be connected. How can I enable DB_INS2 also?
Yours Sincerely
lovecreatesbeauty wrote:
> Superboer wrote:
>> BTW i would start the database as user informix, not as root.
>> there were some security problems in the past....
>
> Thank you. The database server was started successfully as the informix
> user on my machine.
>
> The database was maintained by other people before, I am new to
> informix administration. I have another problem. There is more than one
> database/instance on the database server on my machine. Now some
> database/instance (s) can be connected, but others can not. For
> example, DB_INS1 can be connected, for example in dbaccess, but DB_INS2
> can not be connected. How can I enable DB_INS2 also?
Do you only have one database per instance? This is not necessary, each
instance can contain more than one database.
If DB_INS2 is in another instance, then you'll need to oninit that as
well. You'll have to set your environment (INFORMIXSERVER, ONCONFIG and
maybe INFORMIXDIR) to refer to the other instance.
--
rh
Did the people that maintained the system before not leave detailed
instructions for you on what to do and how the system was configured?
Have you been on any informix training in order that you would
understand those instructions ?
Are the previous administrators coming back?
If the answer to all of the above is no then it may be time to buy in
some resource to help you understand what you have, to set up some
simple instructions and what to do when you get stuck.
This outside resource could also work with you to develop a training
plan so that you are better able to stand on your own feet.
Its not really possible to administer Informix via a bulletin board.
lovecreatesbeauty wrote:
> Superboer wrote:
> > BTW i would start the database as user informix, not as root.
> > there were some security problems in the past....
>
> Thank you. The database server was started successfully as the informix
> user on my machine.
>
> The database was maintained by other people before, I am new to
> informix administration. I have another problem. There is more than one
> database/instance on the database server on my machine. Now some
> database/instance (s) can be connected, but others can not. For
> example, DB_INS1 can be connected, for example in dbaccess, but DB_INS2
> can not be connected. How can I enable DB_INS2 also?
>
> Yours Sincerely
Richard Harnden wrote:
> lovecreatesbeauty wrote:
> > The database was maintained by other people before, I am new to
> > Informix administration. I have another problem. There is more than one
> > database/instance on the database server on my machine. Now some
> > database/instance (s) can be connected, but others can not. For
> > example, DB_INS1 can be connected, for example in dbaccess, but DB_INS2
> > can not be connected. How can I enable DB_INS2 also?
>
> Do you only have one database per instance? This is not necessary, each
> instance can contain more than one database.
>
> If DB_INS2 is in another instance, then you'll need to oninit that as
> well. You'll have to set your environment (INFORMIXSERVER, ONCONFIG and
> maybe INFORMIXDIR) to refer to the other instance.
Thank you, Richard. Perhaps I made mistakes in my last post. Yes, there
are more than one databases on one database server (or instance? I
maybe misunderstand these concepts: database, database server and
database instance. I am trying to make myself clear by the screen
snapshots from dbaccess).
I started Informix database server successfully with oninit as Informix
user. Some databases [1] for example DB_INS1 [2] can be connected, but
others, for example DB_INS2 [3] can not be connected. How can I bring
DB_INS2 online, and make it as same as DB_INS1? Let it can be accessed
from dbaccess like DB_INS1.
[1} See pic. 1 for a full list of databases. DB_INS1 and DB_INS2 can be
found there.
[2} See pic. 2. DB_INS1 is connected.
[3} See pic. 3. DB_INS2 can not be connected.
pic. 1
SELECT DATABASE SERVER >>
Select a server with the Arrow Keys, or enter a name, then press
Return.
-------------------------- Press CTRL-W for Help --------
DB_INS1
DB_INS1shm
DB_INS1soc
DB_INS2
DB_INS2shm
DB_INS2soc
pic. 2
SELECT DATABASE >>
Select a database with the Arrow Keys, or enter a name, then press
Return.
------ @DB_INS1 ------------ Press CTRL-W for Help --------
cred@DB_INS1
stores_demo@DB_INS1
sysmaster@DB_INS1
sysuser@DB_INS1
sysutils@DB_INS1
utilities@DB_INS1
Connected.
pic. 3
CONNECTION: Connect Disconnect Exit
Connect to a database environment.
-------------------------- Press CTRL-W for Help --------
908: Attempt to connect to database server (DB_INS2) failed.
Invalid argument
lovecreatesbeauty wrote:
> Richard Harnden wrote:
>> lovecreatesbeauty wrote:
>>> The database was maintained by other people before, I am new to
>>> Informix administration. I have another problem. There is more than one
>>> database/instance on the database server on my machine. Now some
>>> database/instance (s) can be connected, but others can not. For
>>> example, DB_INS1 can be connected, for example in dbaccess, but DB_INS2
>>> can not be connected. How can I enable DB_INS2 also?
>> Do you only have one database per instance? This is not necessary, each
>> instance can contain more than one database.
>>
>> If DB_INS2 is in another instance, then you'll need to oninit that as
>> well. You'll have to set your environment (INFORMIXSERVER, ONCONFIG and
>> maybe INFORMIXDIR) to refer to the other instance.
>
> Thank you, Richard. Perhaps I made mistakes in my last post. Yes, there
> are more than one databases on one database server (or instance? I
> maybe misunderstand these concepts: database, database server and
> database instance. I am trying to make myself clear by the screen
> snapshots from dbaccess).
Instance and Database Server are pretty much interchangeable. But ...
Each time you run 'oninit' you get a new instance. Each instance will
have a unique $INFORMIXDIR/etc/$ONCONFIG with a unique SERVERNUM and
DBSERVERNAME.
Each instance will have a DBSERVERNAME and could have many
DBSERVERALIASES. These are your Database-Servers, the first column in
your sqlhosts file.
Or, sometimes ...
Database-Server just means the host and instance is the set of
{DBSERVERNAME, DBSERVERALIASES}.
>
> I started Informix database server successfully with oninit as Informix
> user. Some databases [1] for example DB_INS1 [2] can be connected, but
> others, for example DB_INS2 [3] can not be connected. How can I bring
> DB_INS2 online, and make it as same as DB_INS1? Let it can be accessed
> from dbaccess like DB_INS1.
>
> [1} See pic. 1 for a full list of databases. DB_INS1 and DB_INS2 can be
> found there.
> [2} See pic. 2. DB_INS1 is connected.
> [3} See pic. 3. DB_INS2 can not be connected.
>
> pic. 1
>
> SELECT DATABASE SERVER >>
> Select a server with the Arrow Keys, or enter a name, then press
> Return.
> -------------------------- Press CTRL-W for Help --------
>
> DB_INS1
> DB_INS1shm
> DB_INS1soc
> DB_INS2
> DB_INS2shm
> DB_INS2soc
These are database-servers. If DB_INS1 means DataBase_INStance_1, then
it looks like you have two instances.
>
> pic. 2
>
> SELECT DATABASE >>
> Select a database with the Arrow Keys, or enter a name, then press
> Return.
> ------ @DB_INS1 ------------ Press CTRL-W for Help --------
>
> cred@DB_INS1
> stores_demo@DB_INS1
> sysmaster@DB_INS1
> sysuser@DB_INS1
> sysutils@DB_INS1
> utilities@DB_INS1
And, these are databases.
>
> Connected.
>
> pic. 3
>
> CONNECTION: Connect Disconnect Exit
> Connect to a database environment.
> -------------------------- Press CTRL-W for Help --------
>
> 908: Attempt to connect to database server (DB_INS2) failed.
> Invalid argument>
908s are typically an incorrect hostname in the sqlhosts file.
Your sqlhost file will either be $INFORMIXSQLHOSTS or
$INFORMIXDIR/etc/$SQLHOSTS or $INFORMIXDIR/etc/sqlhosts. It's not the
one you posted upthread.
--
rh
Richard Harnden wrote:
> lovecreatesbeauty wrote:
> > Richard Harnden wrote:
> >> lovecreatesbeauty wrote:
> >>> The database was maintained by other people before, I am new to
> >>> Informix administration. I have another problem. There is more than one
> >>> database/instance on the database server on my machine. Now some
> >>> database/instance (s) can be connected, but others can not. For
> >>> example, DB_INS1 can be connected, for example in dbaccess, but DB_INS2
> >>> can not be connected. How can I enable DB_INS2 also?
> >> Do you only have one database per instance? This is not necessary, each
> >> instance can contain more than one database.
> >>
> >> If DB_INS2 is in another instance, then you'll need to oninit that as
> >> well. You'll have to set your environment (INFORMIXSERVER, ONCONFIG and
> >> maybe INFORMIXDIR) to refer to the other instance.
> >
> > Thank you, Richard. Perhaps I made mistakes in my last post. Yes, there
> > are more than one databases on one database server (or instance? I
> > maybe misunderstand these concepts: database, database server and
> > database instance. I am trying to make myself clear by the screen
> > snapshots from dbaccess).
>
> Instance and Database Server are pretty much interchangeable. But ...
>
> Each time you run 'oninit' you get a new instance. Each instance will
> have a unique $INFORMIXDIR/etc/$ONCONFIG with a unique SERVERNUM and
> DBSERVERNAME.
>
> Each instance will have a DBSERVERNAME and could have many
> DBSERVERALIASES. These are your Database-Servers, the first column in
> your sqlhosts file.
>
> Or, sometimes ...
>
> Database-Server just means the host and instance is the set of
> {DBSERVERNAME, DBSERVERALIASES}.
>
> >
> > I started Informix database server successfully with oninit as Informix
> > user. Some databases [1] for example DB_INS1 [2] can be connected, but
> > others, for example DB_INS2 [3] can not be connected. How can I bring
> > DB_INS2 online, and make it as same as DB_INS1? Let it can be accessed
> > from dbaccess like DB_INS1.
> >
> > [1} See pic. 1 for a full list of databases. DB_INS1 and DB_INS2 can be
> > found there.
> > [2} See pic. 2. DB_INS1 is connected.
> > [3} See pic. 3. DB_INS2 can not be connected.
> >
> > pic. 1
> >
> > SELECT DATABASE SERVER >>
> > Select a server with the Arrow Keys, or enter a name, then press
> > Return.
> > -------------------------- Press CTRL-W for Help --------
> >
> > DB_INS1
> > DB_INS1shm
> > DB_INS1soc
> > DB_INS2
> > DB_INS2shm
> > DB_INS2soc
>
> These are database-servers. If DB_INS1 means DataBase_INStance_1, then
> it looks like you have two instances.
>
> >
> > pic. 2
> >
> > SELECT DATABASE >>
> > Select a database with the Arrow Keys, or enter a name, then press
> > Return.
> > ------ @DB_INS1 ------------ Press CTRL-W for Help --------
> >
> > cred@DB_INS1
> > stores_demo@DB_INS1
> > sysmaster@DB_INS1
> > sysuser@DB_INS1
> > sysutils@DB_INS1
> > utilities@DB_INS1
>
> And, these are databases.
>
> >
> > Connected.
> >
> > pic. 3
> >
> > CONNECTION: Connect Disconnect Exit
> > Connect to a database environment.
> > -------------------------- Press CTRL-W for Help --------
> >
> > 908: Attempt to connect to database server (DB_INS2) failed.
> > Invalid argument> >
>
> 908s are typically an incorrect hostname in the sqlhosts file.
>
> Your sqlhost file will either be $INFORMIXSQLHOSTS or
> $INFORMIXDIR/etc/$SQLHOSTS or $INFORMIXDIR/etc/sqlhosts. It's not the
> one you posted upthread.
>
> --
> rh
Thanks all. I make the variable ONCONFIG have this value
ONCONFIG=onconfig.DB_INS2. There is a corresponding configuration fileunder $INFORMIXDIR/etc. It solves my current problem.
[cutting]
>> Thank you, Richard. Perhaps I made mistakes in my last post. Yes,
>> there are more than one databases on one database server (or
instance?
>> I maybe misunderstand these concepts: database, database server and
>> database instance. I am trying to make myself clear by the screen
>> snapshots from dbaccess).
>
>Instance and Database Server are pretty much interchangeable. But ...
>
>Each time you run 'oninit' you get a new instance. Each instance will
have a unique $INFORMIXDIR/etc/$ONCONFIG
>with a unique SERVERNUM and DBSERVERNAME.
>
>Each instance will have a DBSERVERNAME and could have many
DBSERVERALIASES. These are your Database-Servers,
>the first column in your sqlhosts file.
>
>Or, sometimes ...
>
>Database-Server just means the host and instance is the set of
{DBSERVERNAME, DBSERVERALIASES}.
Under the new IM structure IBM are pushing the term Data Server now
Paul Watson
Tel: +44 1414161772
Mob: +44 7818003457
Web: www.oninit.com
GO FURTHER with DB2
GET THERE FASTER with Informix.
Attend the IDUG 2006 European Conference.
Vienna, Austria. 2-6 October 2006
Visit http://www.iiug.org/conf for more information.