Database Rename
Posted in 1992
>We are currently testing a large system (hundreds of 4gl and sql/c
>programs). To do so, we have a number of different test databases
>that simulate a variety of conditions.
>
>Each of the programs has a $database statement, so they access the
>database by a single name. Therefore to test, I have to dump whatever
>data is in the database, then dbimport my new test data.
>
You cant rename a database, but we have found a nifty trick for making
copies of databases that may help. You could copy the database to a
different name, and drop the original.
Here is what we do:
1) Create a named pipe
mknod pipename p
2) In one window, start a tbunload of the whole database
tbunload -t pipename dbname
3) In another window, start a tbload (to pick up the tbunload data thru
the pipe.
tbload -t pipename newdbname
This method is very fast, but has one drawback. The new database does not
have logging turned on. Turning logging on for a database is a nasty
process requiring informix be in quiecsent state.
In general, I would not hard code the database name anywhere, though I
dont know how to get around that in 4gl.
Well, maybe this this will help.....
Let me know if you need more details.
>
--
Naomi Walker (aka N7FSA) Anasazi Inc. Phoenix, Arizona
naomi%anasaz.UUCP@asuvax.eas.asu.edu
Imagine the Universe Beautiful, Just, and Perfect. (Messiahs Handbook)