Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2003
    Location
    India
    Posts
    262

    Unanswered: Moving data from one database to other

    Dear All,

    I have 2 databases, There is a lot of data in both the databases, i would like to move some data from one database to the other. I would like to accept 2 parameters from the user, i.e. emplyee id & dept, on entering the 2 i will unload all the data from the tables to the flat files. Now i need to load this data from the flat files in to the other database. If the data exists in the new database it should update the data. Any workarounds on it. Thanks in advance.

    Regards,

    lloyd

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780
    Hi Lloyd,

    I suggest that create on remote database the table type RAW, next run INSERT-SELECT, next use START VIOLATION TABLE FOR, for extract dupicate rows and create definitive table.

    Gustavo.

  3. #3
    Join Date
    Aug 2003
    Location
    India
    Posts
    262
    Hi Gustavo,

    Thanks for your feedback, but i want to move only specific data from tables in one database to another tables in another database. I will be accepting the dbname, employee id and dept. id from the user, based on that i will be unloading data from all the tables in to a flat file. Now i have to check whether these data exists in the other database, if not then i will hve to load it into the tables of the other database. Please advice.

    Regards,

    lloyd

  4. #4
    Join Date
    May 2004
    Location
    New York
    Posts
    248
    Create the "dummy" tables, load the data in to them and then create a stored procedure to insert or update the record based on its existance in the production tables.

  5. #5
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780
    Hi Lloyd

    I agree with Armteka, you can create a table type RAW, this not loging generate, then match the corresponding rows.

    Gustavo.

  6. #6
    Join Date
    Feb 2004
    Posts
    32
    Create two HPL jobs(Unload from existing Db and Load to new Db). You can
    us the pipe to send it to a named/unnamed unix pipe there by avoiding the i/o on the FS.

    THere is also another way, but I have forgotten the specifics. You can create a "Load" job and call the "Unload" job from within this in HPL.

    -Abraham

  7. #7
    Join Date
    Aug 2003
    Location
    India
    Posts
    262
    Hi Guys,

    Thank you all for your feedback, i will work on your suggesstions.

    Regards,

    lloyd

Posting Permissions

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