Hi! Mike
Steps to duplicate an Informix Database
1. Dbexport the production database i.e. the original database. Suppose the database name is "test_org" and u give the command "dbexport test_org". This command will create a directory under current working directory "test_org.exp" and create some unl file along with a SQL file called "test_org.sql".
2. Open that SQL file and u will see the first line is "database test_org" now change the database name to ur desired name say "test_dup" and now the first line will look like "database test_dup".
3. Now move the sql file, give the following command
mv test_org.sql test_dup.sql
3. Come to the previous directory and give the following command
mv test_org.exp test_dup.exp
dbimport test_dup -d <name of the DBSpace>
I hope this will solve ur problem. PLease let me know if u find any difficulty.
Thanks
adityanlal
Quote:
Originally posted by mwregan
We have a production Informix 9.21 database that we need to apply some changes to, however, to be on the safe side, I'd like to copy the contents of the entire database into another "test" database first. The test database will reside on the same physical server in the same dbspace - however with a different database name.
Any Ideas on what to do? I've looked into dbexport/dbimport, onunload/onload etc... Is this something I can do in a series of SQL statements?
Help!
Thanks,
Mike
|