Re: informix online
Posted in 1992
Topics: High Availability & Replication, Storage & Space Management, Connectivity: ESQL/C, 4GL & Embedded SQL
> A quick question about informix online capability. > > WHAT I WANT TO DO: Multiple databases of the same NAME on > the same machine. > > QUESTION: Must there be multiple online ENGINES to allow > me to keep these systems separate? The online manual describes > the configuration of separate tbconfig files with unique paths > for the rootdbs and unique numbers in the servernum variable. > Am I understanding correctly or not? Yep, you have it correct. We do a lot of Informix 4GL development. We have lots of databases (both OnLine and SE). On our main server (where all our databases live), we have to OnLine partitions. The way you do this is to set the environment variable TBCONFIG to point to the configuration file in ~informix/etc that points to the OnLine you want to use. Informix's default name for the configuration file is tbconfig. We use the two configuration files tbconfig.dev and tbconfig.pro. The tbconfig.dev defines our development databases, and tbconfig.pro defines our production databases. The following sh function allows us to switch between the OnLine partitions easily. switchdb () { case "$1" in development | dev | -d) TBCONFIG=tbconfig.dev ;; production | pro | -p) TBCONFIG=tbconfig.pro ;; "-?") if [ "$TBCONFIG" = tbconfig.pro ] ; then echo "production"; else echo "development" ; fi ;; *) echo "usage: switchdb -d|-p|-?" ;; esac; export TBCONFIG } jeffl ---- Jeffrey F. Lawhorn Information Systems Group Programming Manager Unix, C, and Database Consulting jeffl@isg.com 450 B Street 16th Floor sdsu!isg100!jeffl San Diego, CA 92101 (619) 234-3405 x274