Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2008
    Posts
    14

    Unanswered: dbimport and dbexport synonym problem

    I use Informix 7.31.

    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?

    Thanks,
    Mario

  2. #2
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    248
    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
    Code:
    CLOSE DATABASE
    DATABASE databasename@servername
    This way the statements are interpreted by the remote engine and stored regardless of the fysical configuration differences.

    Regards,
    Hans
    Last edited by Tyveleyn; 10-12-08 at 12:27.

  3. #3
    Join Date
    Sep 2008
    Posts
    14
    And what about ONTAPE command if operating systems are different, but IDS versions are the same? Is it possible to backup and restore data from one system to another in that case (from AIX to CentOS)?

    Do you know how to overcome synonym creation problem with dbexport and dbimport?

    Thanks,
    Mario

  4. #4
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    248
    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.

    Hans

  5. #5
    Join Date
    Sep 2008
    Posts
    14
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •