I have synonym tables from one database to another.
When I export data with dbexport from one database and import it on other server with dbimport, I get the error about creating synonyms because the table in the other database dooesn't exist. Also, dbexport creates SQL file with insert data in that synonym table and gives an error, too.
1. Is it possible to backup database by database (containing synonyms from one database to another) on one server and restore database by database on other server? Is there any command to backup all databases to one file and simply restore it on the other server?
2. What are the ways of duplicating data from one server to another using different dbspaces?
Hi, dbexport and dbimport are migration tools and not backup utilities. What you can do is install a exact copy of a database engine on another server with exactly the same dbspaces and chunks. The contents of all databases on the first server can be backed up (to file or tape) with the ontape (-s -L 0 for a level 0 backup) command. On the second server this backup can be imported with the same ontape (-r) command and a complete copy including synonims and data exists on the second server.
For duplicating data from one server to another I only can think of (beside scripts and files) executing SQL DML statements from the source server on a remote database with
This way the statements are interpreted by the remote engine and stored regardless of the fysical configuration differences.
I wouldn't know about that, you could try with ontape -r -rename ... For that you must supply the translations of the original chunkpaths to the new chunkpaths in a file presented to ontape. You can read about it in the backup and restore guide here http://www-01.ibm.com/software/data/...ary/ids_7.html But I'm realy not shure if this will work.
About your dbexport and dbimport question, you can always remove the synonyms unload file and edit the schema file before performing dbimport.
Thanks Hans. I executed dbimport twice. Synonyms are created after tables and data in tables, so after importing all databases with dbimport all tables were created, and the second time everything worked fine