Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    15

    Exclamation Unanswered: Moving Chunks of IDS7.31.UC5

    Hi,
    We are going to install two new disk on our SUN UNIX system and I would "move" DB chunks to the new disks.
    How is the best way to do that ?

    Thanks for any help

    Note :
    I'm sending the onstat -d

    Informix Dynamic Server Version 7.31.UC5 -- On-Line -- Up 78 days 08:37:47 -- 20576 Kbytes

    Dbspaces
    address number flags fchunk nchunks flags owner name
    a492150 1 1 1 1 N informix rootdbs
    a492608 2 1 2 3 N informix hnmdbs
    2 active, 2047 maximum

    Chunks
    address chk/dbs offset size free bpages flags pathname
    a492210 1 1 0 50000 46689 PO- /dev/rdsk/c0t0d0s4
    a492368 2 2 0 900000 283 PO- /dev/rdsk/c0t0d0s5
    a492448 3 2 0 250000 1453 PO- /opt/informix/hnmdbs_chnk2/hnmdbs_chnk2
    a492528 4 2 0 250000 135309 PO- /opt/informix/hnmdbs_chnk2/hnmdbs_chnk3
    4 active, 2047 maximum

  2. #2
    Join Date
    May 2002
    Location
    Osnabrueck Germany
    Posts
    59

    Re: Moving Chunks of IDS7.31.UC5

    Hi,
    best way would be, if the addresses of the chunks are sysmbolic link. There it is possible to change the hardware, just link to the new hardware.
    Juergen Ladwig

  3. #3
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    15

    Lightbulb

    Hi,

    One of the proble is that they aren't symbolic links .

  4. #4
    Join Date
    May 2002
    Location
    Osnabrueck Germany
    Posts
    59
    Hi,
    ja thats sounds like you get new disks with new names. It don't think that for example ontape -r will work if there are chunks with different names. There is a chance with dbexport, or onunload if the files less than 2GB in size.
    Juergen Ladwig

  5. #5
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    15
    Yes, You are right. I would like to make the following:

    1_ Setup a New Informix engine in the new disks
    2_ Create Tables
    2_ Export data from the DB an impot to the new one.
    3_ Make some tests
    4_ Change "The servers names".

    I know how to Creates Tables and tranfer the data , But I know nothing agout create new engine, database netither how to change the database names. I need to maintain the "Server Name " and DataBase Name due to the application that it is using the Informix, has "hardcoded" these settings.

    Thanks for any help

  6. #6
    Join Date
    May 2002
    Location
    Osnabrueck Germany
    Posts
    59
    Hi,
    with dbexport/dbimport you do not need to create tables, dbimport does ist, ist creates DB too. Just copy the file onconfig and change all dir/path and names. Save the old onconfig by another name, then oninit -i and create all environments belonging to that online engine. Dbimport and ready, sound easy, try it. That ist really a short informtion, maybe it will help. So i'm off duty now leaving to weekend .
    So long.
    Juergen Ladwig

  7. #7
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    15
    Thanks I'll try, Have a nice weekend

  8. #8
    Join Date
    Feb 2004
    Posts
    32
    You can also do this.........
    Say your current database is Db_01 and the current dbspaces are
    dbspace_01 and dbspace_02.
    Do the following.......

    1. Create the two(n-number of) dbspaces.
    eg: dbs_01 & dbs_02.
    2. Do dbschema -ss -d <Db_01> Db_01.sql
    3. Vi Db_01.sql and run
    :sed -e 's/dbspace_01/dbs_01/g'
    :sed -e 's/dbspace_02/dbs_02/g'
    save the file as Db_01_new.sql
    4. echo " create database Db_01_new in dbs_01 " |dbaccess Db_01
    5. set the TAPEDEV to /dev/null in the $ONCONFIG file.
    6. Run ontape -s -L 0 -N Db_01 (Note the logging status prior to changing) and reset the TAPEDEV parameter to its original value.
    7. Execute the following for each table in the Db_01 database.
    echo "insert into Db_01_new:<table_01> select * from
    Db_01:<table_01> " |dbaccess Db_01_new
    8. Once all data is loaded, and audits done on the tables, do a level 0 backup.
    9. echo "drop database Db_01; rename database Db_01_new to
    Db_01" |dbaccess sysmaster
    10. Run Update Statistics for the database and you are set to go.

    If you need any clarification, don't heistate.

    -Abraham

  9. #9
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    15
    Thanks all, The migracion has been succesfully.

Posting Permissions

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