Hi,
Have tablespace 20 GB of data. I want to export it and import it to another database.
I want to have less down time..
Export itself takes long time. Can export and import be done at the same time. Any way out ..?
Printable View
Hi,
Have tablespace 20 GB of data. I want to export it and import it to another database.
I want to have less down time..
Export itself takes long time. Can export and import be done at the same time. Any way out ..?
Perhaps if you used files?
Please elaborate a little bit more..
The databases, both are in same server.. I want to send compressed file with PIPE and at the same time also I want to import to other database from the same compressed file....
Is it possible..?
you want to import into one db from the same file that the export is in the middle of producing?Quote:
Originally posted by skdas
Please elaborate a little bit more..
The databases, both are in same server.. I want to send compressed file with PIPE and at the same time also I want to import to other database from the same compressed file....
Is it possible..?
you can but if the process interrrupts you have to start all over again which can be longer than doing export then import seperately!
Why don't you clone the database to the other server (with RMAN). That's very fast method.Quote:
Originally posted by skdas
Hi,
Have tablespace 20 GB of data. I want to export it and import it to another database.
I want to have less down time..
Export itself takes long time. Can export and import be done at the same time. Any way out ..?
Export and Import can be done simultaneously using unix pipes. This is the faster than any other method I had used.
Tamil
Do you mean directly through a pipe, or through a fifo file/node?Quote:
Originally posted by tamilselvan
Export and Import can be done simultaneously using unix pipes. This is the faster than any other method I had used.
Tamil
Through pipes and rsh.
Tamil
copy is the best & fastest.
We are discussing about export/import not copy command.
Tamil
So what? Nothing wrong with mentioning other methodologies. If the original question is "how do i move data only as fast as possible", then COPY is a good solution -- particularly if it can be done with multiple sessions simultaneously. I've often found it to be much faster than export/import, and more robust also.
I duuno why ppl tend to look for harder methods when we have simple & the best methods :rolleyes: :rolleyes:Quote:
Originally posted by tamilselvan
We are discussing about export/import not copy command.
Tamil
Can anybody elaborate how to do export and import simulataneously using unix pipes or whatever ??
Steps are:
1 On the Source machine (Let me call it SRC) create unix pipe export
$ mknod /dev/p_exp p
mknod is a command in Solaris to create named pipe.
2 On the Target machine create unix pipe for import
$ mknod /dev/p_imp p
3 On the Target run rsh (remote shell) to copy the file from Source in background and send the output to import pipe
$ rsh SRC dd if=/dev/p_exp > /dev/p_imp
4 On the Source, run the export
$ exp / file=/dev/p_exp full=Y
Wait for 30 Seconds.
5 On the Target, run the import
$ imp / file=/dev/p_imp full=Y
Here order of the steps is very important. Also you should have priv to run rsh. You can also use rcp instead of rsh.
Tamil
To Slimdave,
When I saw copy command as suggested by abhask, I did not think Oracle COPY command, I thought unix cp. That is why I said "We are discussing about exp/imp". Sorry to all.
But I still feel COPY command will be slow, because of dblink is involved.
Tamil
If you have spare cpu cycles, it might be worth compressing the data on the way into p_exp, and uncompressing it on the way out of p_impQuote:
Originally posted by tamilselvan
[B]Steps are:
1 On the Source machine (Let me call it SRC) create unix pipe export
$ mknod /dev/p_exp p
mknod is a command in Solaris to create named pipe.
2 On the Target machine create unix pipe for import
$ mknod /dev/p_imp p
3 On the Target run rsh (remote shell) to copy the file from Source in background and send the output to import pipe
$ rsh SRC dd if=/dev/p_exp > /dev/p_imp
4 On the Source, run the export
$ exp / file=/dev/p_exp full=Y
Wait for 30 Seconds.
5 On the Target, run the import
$ imp / file=/dev/p_imp full=Y
Here order of the steps is very important. Also you should have priv to run rsh. You can also use rcp instead of rsh.
Tamil
Oh OK, but SQL*Plus copy command doesn't use db_links -- the data gets read by sqlplus from the source db and written to the target db through regular SQL*Net connection.Quote:
Originally posted by tamilselvan
To Slimdave,
When I saw copy command as suggested by abhask, I did not think Oracle COPY command, I thought unix cp. That is why I said "We are discussing about exp/imp". Sorry to all.
But I still feel COPY command will be slow, because of dblink is involved.
Tamil
Therefore you really want the sqlplus session to be running on either the source or the target host to avoid doubling-up on your network traffic
I bow down to the master of the pipes...Quote:
Originally posted by tamilselvan
Steps are:
1 On the Source machine (Let me call it SRC) create unix pipe export
$ mknod /dev/p_exp p
mknod is a command in Solaris to create named pipe.
2 On the Target machine create unix pipe for import
$ mknod /dev/p_imp p
3 On the Target run rsh (remote shell) to copy the file from Source in background and send the output to import pipe
$ rsh SRC dd if=/dev/p_exp > /dev/p_imp
4 On the Source, run the export
$ exp / file=/dev/p_exp full=Y
Wait for 30 Seconds.
5 On the Target, run the import
$ imp / file=/dev/p_imp full=Y
Here order of the steps is very important. Also you should have priv to run rsh. You can also use rcp instead of rsh.
Tamil
Tamil :Quote:
Originally posted by tamilselvan
But I still feel COPY command will be slow, because of dblink is involved.
Tamil
It will be worth testing of Simultaneous Exp/Imp Vs COPY ( as suggested by Dave, the SQLPLUS session being open on either Source Or Traget Server ) and dont forget keeping Arraysize 5000 and copycommit your choice preferablly < 50..
Abhay.
Either way, you're network will be the limiting factor. Unless you are running multiplexed GB adapters or your disks are really slow, I doubt either method has a significant advantage over the other.Quote:
Originally posted by abhaysk
Tamil :
It will be worth testing of Simultaneous Exp/Imp Vs COPY ( as suggested by Dave, the SQLPLUS session being open on either Source Or Traget Server ) and dont forget keeping Arraysize 5000 and copycommit your choice preferablly < 50..
Abhay.
Well Network will be limiting factor, but does Import do any better Over Insert using COPY will be the question..So isnt it better to perform a test?Quote:
Originally posted by marist89
Either way, you're network will be the limiting factor. Unless you are running multiplexed GB adapters or your disks are really slow, I doubt either method has a significant advantage over the other.
PS I have no idea about "multiplexed GB adapters", if you could let me know about it, would be better (ofcourse I can STW, thas different issue)
Abhay.
If you've got the kind of time to chase after a dime when there's thousands of dollars on the table, go for it.Quote:
Originally posted by abhaysk
Well Network will be limiting factor, but does Import do any better Over Insert using COPY will be the question..So isnt it better to perform a test?
Two Gigabit Ethernet adapters on each box bound as one. (ie. lots of bandwidth between servers)Quote:
PS I have no idea about "multiplexed GB adapters", if you could let me know about it, would be better (ofcourse I can STW, thas different issue)
Sounds a little high to me -- i would expect that you'd be getting collisions on the network. I'd keep it to 500.Quote:
Originally posted by abhaysk
... dont forget keeping Arraysize 5000 ...
Collisions, It would not be as you expected.. IMHO and used many times it quite faster than defualt ARRAYSIZE 15 or even 500 as you said...Quote:
Originally posted by slimdave
Sounds a little high to me -- i would expect that you'd be getting collisions on the network. I'd keep it to 500.
Well it will be as any other copy over N/W, but in the bundles of the sizes due to 5000 rows !! & which will not be a problem as/when a Copy of over a Gig Bytes will not..
Abhay.