Re: How do I rename a database?
Posted in 1992
Path: emory!swrinde!cs.utexas.edu!sun-barr!west.West.Sun.COM!news2me.ebay.sun.com!exodus.Eng.Sun.COM!appserv.Eng.Sun.COM!sun!amdcad!weitek!pyramid!infmx!johnl From: johnl@informix.com (Jonathan Leffler) Newsgroups: comp.databases.informix Keywords: database, rename Message-ID: <1992Mar6.132753.16615@informix.com> Date: 6 Mar 92 13:27:53 GMT References: <1992Mar5.213646.14124@cs.odu.edu> <1992Mar6.033543.6688@nas.nasa.gov> Sender: news@informix.com (Usenet News) Organization: Informix Software, Inc. In article <1992Mar6.033543.6688@nas.nasa.gov> jcarter@sun204.nas.nasa.gov (John R. Carter Sr.) writes: >In article <1992Mar5.213646.14124@cs.odu.edu> bander@oswine.cs.odu.edu Writes: >> can I rename a database? > >I hope someone else has a really nifty solution for you. The question is not so much "how can I rename a database?" as "How can I use a test database and a live database and switch between the two?". There are two answers, one for Standard Engine, one for OnLine. STANDARD ENGINE. a. Primary (live) database lives in /usr/project/live/database.dbs b. Secondary (test) database lives in /usr/project/test/database.dbs c. When using primary database, DBPATH=/usr/project/live:... d. When using secondary database, DBPATH=/usr/project/test:... The ... represents the locations where the form files, message files, etc live. To switch (using Bourne/Korn shell): . dbs.live . dbs.test To switch (using C shell); source dbs.live.csh source dbs.test.csh ONLINE There is no way to do this except by having two OnLine systems around, probably on the same machine. Normally, this means having a small configuration (possibly using cooked files to store the database) with minimal shared memory for the test system, and a main configuration (with a lot of shared memory and raw disks for the database) for the live system. The two systems would have different TBCONFIG files, say tbconfig.live and tbconfig.test. To switch between the two, change the value of TBCONFIG. >I hope someone else has a really nifty solution for you. Is this (or are these) nifty enough? -- ------------------------------------------------------------------- Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>