Help with open database needed !!!
Posted in 1999
Topics: Server Administration, Security, Permissions & Auditing, Networking & sqlhosts Configuration
Hello,
I have the following problem. On computer A i wrote a program that open
the
Database and do something.It works. On Computer B i execute the same
program
and got the failure :
-25555 Server server-name is not listed as a dbserver name in sqlhosts
Enviroment : IDS 730 C8, Sinix 5.44 , RM400 / RM600
The entries in sqlhost A are :
ol_alia onipcshm * turbo
ol_alia ontlitcp * sqlexec
In sqlhost B are :
ol_L643D onipcshm * turbo
ol_L643D ontlitcp * sqlexec
"Grant dba to root " on both computers. Program run as root
Which other reasons can this error message caused ?
Thanx for your help
Thorsten
------------------------------------------------------
Thorsten Geelhaar Telefon: +49 231 5599 106
Dr. Materna GmbH Fax : +49 231 5599 100
Vosskuhle 37 e-mail : Thorsten.Geelhaar@materna.de
D-44141 Dortmund GERMANY
------------------------------------------------------
Looks like the DATABASE or CONNECT statement in that application specifies
the DBSERVERNAME of machine A and that server is not listed in the
sqlhosts file in machine B. Good thing too since it would have been
operating on the data from machine A not machine B! Check the DATABASE
and/or CONNECT statements and remove the DBSERVERNAME. Use the
INFORMIXSERVER environment variable to specify the host instead (or a
commandline option if you want to make specifying at runtime easier and
more secure).
Art S. Kagel
Thorsten Geelhaar wrote:
>
> Hello,
>
> I have the following problem. On computer A i wrote a program that open
> the
> Database and do something.It works. On Computer B i execute the same
> program
> and got the failure :
>
> -25555 Server server-name is not listed as a dbserver name in sqlhosts
>
> Enviroment : IDS 730 C8, Sinix 5.44 , RM400 / RM600
>
> The entries in sqlhost A are :
> ol_alia onipcshm * turbo
> ol_alia ontlitcp * sqlexec>
> In sqlhost B are :
> ol_L643D onipcshm * turbo
> ol_L643D ontlitcp * sqlexec>
> "Grant dba to root " on both computers. Program run as root
>
> Which other reasons can this error message caused ?
>
> Thanx for your help
> Thorsten
>
> ------------------------------------------------------
> Thorsten Geelhaar Telefon: +49 231 5599 106
> Dr. Materna GmbH Fax : +49 231 5599 100
>
> Vosskuhle 37 e-mail : Thorsten.Geelhaar@materna.de
> D-44141 Dortmund GERMANY
> ------------------------------------------------------
"Art S. Kagel" wrote: > > Looks like the DATABASE or CONNECT statement in that application specifies > the DBSERVERNAME of machine A and that server is not listed in the > sqlhosts file in machine B. Good thing too since it would have been > operating on the data from machine A not machine B! Check the DATABASE > and/or CONNECT statements and remove the DBSERVERNAME. Use the > INFORMIXSERVER environment variable to specify the host instead (or a > commandline option if you want to make specifying at runtime easier and > more secure). > > Art S. Kagel I had doing that , sorry that i does not mentioned it. I Examine the code but there is nothing i could find. It work also on other computers, too . Only on this specific not. I believe it has something to do with the configuration, but i could not find it. Open Database code: int OpenDatabase(const char *dbname) { char db_name[200]; #if INF_VER >= 700 /* INF_VER = Informix-Version */ char *IS=NULL; if ( NULL == (IS = getenv("INFORMIXSERVER")) ) { LK_ERROR_MSG(E_OPEN_DATABASE_FAILED, ("Database: nccdb Enviromentvariable INFORMIXSERVER not set !")); return N_OK; } sprintf(db_name, "%s@%s", dbname, IS); #else sprintf(db_name, "%s", dbname); #endif return !ExecuteSQL("database %s", db_name); } Thorsten Geelhaar. Nach Paragraph 28 Abs. 3 des Bundesdatenschutzgesetz widerspreche ich der Nutzung oder Uebermittlung meiner Daten fuer Zwecke der Werbung oder der Markt- oder Meinungsforschung. ------------------------------------------------------ Thorsten Geelhaar Telefon: +49 231 5599 106 Dr. Materna GmbH Fax : +49 231 5599 100 Vosskuhle 37 e-mail : Thorsten.Geelhaar@materna.de D-44141 Dortmund GERMANY ------------------------------------------------------