If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Moving Chunks of IDS7.31.UC5

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-19-04, 16:21
wzbn wzbn is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 14
Exclamation 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
Reply With Quote
  #2 (permalink)  
Old 02-20-04, 09:08
ladwig ladwig is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 02-20-04, 09:31
wzbn wzbn is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 14
Lightbulb

Hi,

One of the proble is that they aren't symbolic links .
Reply With Quote
  #4 (permalink)  
Old 02-20-04, 09:39
ladwig ladwig is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 02-20-04, 09:47
wzbn wzbn is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 14
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
Reply With Quote
  #6 (permalink)  
Old 02-20-04, 09:55
ladwig ladwig is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 02-20-04, 09:59
wzbn wzbn is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 14
Thanks I'll try, Have a nice weekend
Reply With Quote
  #8 (permalink)  
Old 02-22-04, 19:46
bull_abraham bull_abraham is offline
Registered User
 
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
Reply With Quote
  #9 (permalink)  
Old 03-02-04, 12:10
wzbn wzbn is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 14
Thanks all, The migracion has been succesfully.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On