Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Migration

Status
Not open for further replies.
Apr 23, 2002
52
US
I'm running Informix Dynamic Server 7.31 UC5-1 on SCO 5.04. I have set up a "play" server to practice on. I want to import a database from my "real" server to my "play" server. I don't have a tape drive on the play box. I have read the Informix info on data migration. I understand that I can use OnUnload to put the database I want to move into a file. The Informix info says that I can move the file to the new machine over the network. I need some guidance on how to accomplish that. Would I be using Informix or UNIX to accomplish moving the file from one server to another? Specifics on how to move the file would be most helpful.

Also, when using OnUnload does the database continue to exist on the original server (am I copying or cutting)? Are there any issues that I should be aware of? I am doing this practice run to prepare for a real migration to a new server in the near future.
 
If the dbspaces have the same path names and sizes on both servers and you have enough filesystem space you can do the following :


on Server A:

1.set TAPEDEV to file (ex - /myfs/tmp/server_lvl0)
- make sure the TAPESIZE is bigger than instance size

2.run ontape -s -L 0

3. compress /myfs/tmp/server_lvl0

4. ftp /myfs/tmp/server_lvl0 to Server B


on Server B

1. uncompress /myfs/tmp/server_lvl0

2. set TAPEDEV to file /myfs/tmp/server_lvl0
- make sure the TAPESIZE is bigger than instance size

3. run ontape -r

4. run oninit -m (after recovery the instance will be in quiescent mode)


 
Hi,
also possible:

dbexport DB

move the whole dir and files to the play engine

dbimport DB -d dbspace

that's it.
 
Thanks for your responses. I need to school myself on using FTP. I've browsed my UNIX manuals and only found references to UUCP.
 
I dbexported the database to a directory. When I try to FTP (get)the directory or the .exp file I get a message "Not a plain file". I've tried binary and ascii. What's up?
 
Hi,
there is a problem to copy a whole dir by ftp. Ok try to connect with ftp -i b
bin
cd exportdir
mget *


 
On the "play" server I created a directory called sfatest_db and a subdirectory sfatest.exp. I used mget * and did get all files transferred into sfatest.exp. However when I use dbimport I get a message that it can't open the sql file. Is this something to do with the application software that creates/uses the database?

I'm not sure if this is proper forum etiquette but would anyone be willing to help me via e-mail? I'm a real novice at this and I'm not sure this level of discussion adds anything to this forum.

 
On the "play" server I created a directory called sfatest_db and a subdirectory sfatest.exp. I used mget * and did get all files transferred into sfatest.exp. However when I use dbimport I get a message that it can't open the sql file. Is this something to do with the application software that creates/uses the database?

I'm not sure if this is proper forum etiquette but would anyone be willing to help me via e-mail? I'm a real novice at this and I'm not sure this level of discussion adds anything to this forum.

 
dbimport will look into the <dbname>.exp directory for an sql file. You have to run the dbimport cmd from the directory where the .exp sub directory resides. In other words, run dbimport from the sfatest_db directory not sfatest.exp
 
Hi,
try like tm88gt write, build up the dir with all files you see on the server. Start the dbexport within that dir you are able to see dbxxx.exp. If that doesn't work we will get in touch.
 
I ran dbimport from sfatest_db - the parent directory of sfatetst.exp/ Still get the error &quot;Cannot open sql script file&quot;. This is when I am running as root. I used su to change to user informix and then get a error &quot;Cannot create message file&quot;.

ONUNLOAD & ONLOAD
I tried to use onunload on the production server but nothing happens. I let it run for over an hour and finally killed the process. I ran onunload -t sfatest sfatest. I do have write permission on sfatest.

I did use onunload successfully on the &quot;play&quot; server. I unloaded the stores7 database into a file -storesdb. However, when I try to onload storesdb into the mjwdbs dbspace I get a &quot;Usage&quot; message showing the parameters for onload. I used onload -t /usr/informix/storesdb -d mjwdbs
I have also gotten a message to mount the tape.


I have been trying since Mon. to transfer a database. This is a little frustrating.
 
Hi,
do you have a *.sql file. Can you open it by an editor. Check it. Also, please check the file dbexport.out. Last line have to be: DBexport completed.
 
Yes I can open the .sql file with dbaccess. The dbexport file does end with 'dbexport completed'. The dbimport file has 'Unable to open sql script'.

I have tried to create a database with dbaccess and then run the sql on that database. When I try to create the database I get a 'running...' message but nothing happens (for over an hour) and I have to kill the process.
 
Hi,
ok, set chmod777 dir where the dbexport is in it. chmod 777 all files too, just to be shure. Try dbimport with user informix by real login not with su.
 
what is the dbimport syntax you using?

should be:

dbimport <database> -d <dbspace> -l {buffered or leave blank for unbuffered}
 
All dir's and files set to 0777. When I try to run as informix I get message to set INFORMIXSERVER. I'm going thru my UNIX stuff to find out where to set env. variables for users. But shouldn't I be able to do the dbimport as root?

Syntax is dbimport sfatest -d mjwdbs
 
Hi,
it looks like that some variable are not set correctly. If all Informix variable and system varible are correct you are able to start most of Informix commands(dbexport, dbaccess, onstat ....) from any user.
Syntax is ok.
 
Still looking for the problem. I edited .profile for user informix and set env. variables.
I signed in as informix (on the play server) and used onmonitor to take IDS offline. I then brought it back on-line. When I looked at the process manager there were many oninit processes running with root as the owner. Why would I have multiple instances of oninit running and with root as the owner?
I'm probably going to start the dbexport/dbimport attempt over from scratch. I will use the informix signon on the production server to recreate the dbexport file. First I have to find out why when signing on as informix I get looped back to the SCO login.
 
Hi,
oninit processes depends on the onconfig varible NUMCPUVPS. Oninit started with root is ok.
 
Hi,

The number of oninit process spawning is based on onconfig parameters NUMCPUVPS and NUMAIOVPS.

For data porting into &quot;play&quot; server consider the following steps:

1. Login into test server using informix user credentials.

2. Make sure the environment variable are set.
a. INFORMIXDIR
b. INFORMIXSERVER

3. If the data lies in a disk, fire the following command:
dbimport testdb -d dbspace1 -i /dirname

You may execute dbimport command from any directory provided you specify the -i switch with a qualified data directory name. &quot;/dirname&quot; is the directory where the testdb.exp directory exists.

Regards,
Shriyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top