Re: How do I use 2 DB at once?/7.x Multiple residency
Posted in 1996
Think about it!!! Not a bug, isql <dbname>, does not connect to REMOTE
databases, it MUST EXIST in the configuration that you have your ONCONFIG
or TBCONFIG set as!!!
You have made your connect to a host within that DB. You can not have
the same Informix DB name within Configuration ONLINE/SE (Online being the
Engine I'm most familiar with),but you could have it on different
configuration and/or machine!
So if you want to get there you have to tell Informix on what HOST system
you want the information. Informix uses the sqlhost file to connect to the
DB because of course DBSERVERNAME is UNIQUE on each configuration and/or
machine!!! For an Informix 7 online configuration you have TWO:
one for the shared mememory (onipcshm)
another for a TCP connection (olsoctcp/oltlitcp).
#dbserver_name nettype unix_host_name service name
#**************************************************************************
DBSERVERNAME onipcshm HOST_MACHINE_NAME HOST_ETC_SERVICE_NAME
DBSERVERNAME olsoctcp HOST_MACHINE_NAME HOST_ETC_SERVICE_NAME
Hope this helps!!!
-------------------------------------------------------------------------
Cheryl Kendricks
Internet:cherylk@prod1.jcdc.doleta.gov OR cherylk@gwysmtp.jcdc.doleta.gov
DTSI, Inc. Voice: 1-800-598-5008 Fax: 512-393-7296
Database Administrator - DOL Job Corps San Marcos, Texas
------------------------------------------------------------------------
On 7 Jun 1996, Joel Schumacher wrote:
} Mike Segel (mikey@segel.com) wrote:
} : Joel Schumacher wrote:
}
} : > If I change it to the form " SELECT * FROM
} : > bbb@beta_engine_name:anytable", it works just fine.
} : >
} : > I really dont want to have to use the form
} : > database@enginename:tablename. enginename varies from site to site.
} : > I could store it someplace, but that's one more thing (besides
} : > changing the global DBPATH variable) that needs to be changed if the
} : > BBB database's location changes.
} : >
} : > So, is this a bug? Shouldn't Informix be able to locate my BBB
} : > database from my DBPATH when I use the form database:tablename?
}
} : No, this is not a bug.
} : DBPATH is used to identify standard engine databases local to your
} : machine. ONCONFIG I believe points to the local instance of ONLINE.
} : (Hey what do I know its 1:00 am and I am still awake.)
} : DBPATH will not be able to know about your other machines.
}
} This does not seem to be the case. If I'm on machine alpha and
} //beta_engine_name is in my DBPATH, I can execute a "isql bbb" command
} and it will open up the bbb database just fine. (bbb resides on beta).
}
} If I take //beta_engine_name out of my DBPATH and do an "isql bbb", it
} will not find the database.
}
} Of course, some sort of I-STAR (or whatever it's called nowadays) setup
} has to be there to let the alpha machine know that there's a
} beta_engine_name engine out there and where to find it. (Even a
} statement with the @: "SELECT * FROM bbb@beta_engine_name:anytable"
} would need this setup.)
}
} So my question remains, if an "isql <database>" command or a
} "DATABASE <database>" statement will use DBPATH to find the database
} (even remote ones), why won't the form "SELECT * FROM database:table",
} if <database> isn't local. Bug? Or is it defined to work like this?
} __________________________________________________________________________
} Joel Schumacher JCPenney Co. - UNIX Network Systems
} jschumac@uns-dv1.jcpenney.com 12700 Park Central Pl
} (214) 591-7543 Dallas TX 75251
}