Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003

    Unanswered: copying table from 1 db to another

    I have a 'live' & 'test' version of the same db. One called
    live & one called test.

    I have a table on the live side that I need to copy over to the 'test' side.
    For the life of me I can't figure out the informix sql sytax.

    seems like
    create table ol_train.ren_option_invite as select * from ol_live.ren_option_invite

    where ol_live is the naming convention of the live db instance & ol_train isthe name of the training environment. Seems like this should work but nope it doesn't.

    I'm obviously missing something obvious but have no idea what it is.

    Thank you in advance.


  2. #2
    Join Date
    May 2002
    Osnabrueck Germany
    what about onunload and onload, have to be the same DB-Version.

    onunload -t table.onu ol.livewner.table_name

    load back in the second DB

    onload -t table.onu ol.trainwner.table_name
    Juergen Ladwig

  3. #3
    Join Date
    Dec 2003
    North America
    Different ways to do this & it's been a while since I've done this, previous example using unload and load works well.

    To do this in a single step, I think you must specify the DB name@instance namewner of the DB in single quotes.table name of the table you're selecting data from.

    This assumes the target table in the test DB already exists and whatever SQL tool you're using is accessing the testDB.

    Example: insert into ren_option_invite
    select * from live@prod-instance:'sysadm'.ren_option_invite

  4. #4
    Join Date
    Nov 2003


    that points me in the right direction.

Posting Permissions

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