Re: How do I rename a database?
Posted in 1992
> 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. ..... > 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. > > >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> > Could I possibly suggest Jonathan that you have a quick look in the manual :-) RTFM :-)) as I'm not sure what the problem is? You certainly don't need two Online sessions. As the database statement will take a variable as its parameter what we do is define an environmental variable called DBID and set it to the name of the database we wish to access. Then at the start of each program we have a routine that uses get_env to read DBID into a variable (f_db_name) and then use database f_db_name This works for standard and online engines .03 onwards and as the program database statement overrides the forms database statement in both ISQL and I4GL we use any of the database names in the forms. Cheers - Jim -------------------------------------------------------------------- Name: Jim Gordon Internet: jgordon@ssf-sys.DHL.COM Company: DHL Systems Inc Phone: (415) 358-5911 (Work) Address: 1700 S. Amphlett Blvd. (415) 882-9728 (Home) San Mateo, CA 94402 Fax: (415) 571-6429 --------------------------------------------------------------------