Import dmp file from server to another server [message #198357] |
Mon, 16 October 2006 15:00 |
khmba
Messages: 19 Registered: October 2006
|
Junior Member |
|
|
Hello,
I'm working under Oracle 10g .
every day i export data from server No1.
I have an export file sp.dmp done with the following options :
exp system/manager owner=sp file=c:\sp.dmp
The export is ok,
I want to import this file to another server "server No2'.
sp is already existing in server No2 'tables,data,...'
I try to import the exported file with :
imp system/manager fromuser=sp touser=sp file=c:\sp.dmp ignore=y .
it takes to much times and some data not exported.
how can I import faster and no data lose ?
Thanks for help.
|
|
|
Re: Import dmp file from server to another server [message #198358 is a reply to message #198357] |
Mon, 16 October 2006 15:28 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
What does it mean, "too much time"? Compared to what? Did it (once upon a time) take much less to import? Perhaps there's more data now than before?
Data loss: what does this mean? When you, for example, SELECT COUNT(*) FROM server_1_table, is it different from SELECT COUNT(*) FROM server_2_table? Or do you, perhaps, refer to invalid views and stored procedures after import?
Because, basically (unless I'm wrong about it), your EXP and IMP commands seem to be OK.
|
|
|
|
|
|
Re: Import dmp file from server to another server [message #198519 is a reply to message #198357] |
Tue, 17 October 2006 08:34 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
khmba wrote on Mon, 16 October 2006 16:00 |
imp system/manager fromuser=sp touser=sp file=c:\sp.dmp ignore=y .
it takes to much times and some data not exported.
how can I import faster and no data lose ?
|
I don't understand. What do you mean some data not exported? You are importing not exporting.
If all your tables and indexes exist beforehend, then your import will be very slow as it is updating the index for every single row of the import.
You do understand that import is going to add all the data to the tables and not replace them, right?
|
|
|
Re: Import dmp file from server to another server [message #199031 is a reply to message #198357] |
Thu, 19 October 2006 14:33 |
khmba
Messages: 19 Registered: October 2006
|
Junior Member |
|
|
Thank for all
Yes In server No2 there is tables, indexes, triggers, procedures …
When I imported sp.dmp file
Imp system/manager fromuser=sp touser=sp file=c: \sp.dmp
It takes to many times.
Data loss: what does this mean? I mean
Not all data imported
For example
There are tables
1- bills (master)
2- bill_dtls (details)
In table bills in server No1 40270 rows in server N02 is same 40270 rows
But in table bill_dtls in server N01 168083 rows but in server No2 109617 rows.
Also I have other master details tables.
When I dropped sp users and re-create user sp and imported sp.dmp file
Everything is ok.
Data in server No1 same data in server No2.
Is there any way to import file without drop user?
Thanks.
|
|
|
Re: Import dmp file from server to another server [message #199092 is a reply to message #199031] |
Fri, 20 October 2006 02:18 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
If I'm not wrong, IMPORT utility is clever and disables all constraints before import process begins. This means that, although tables are dependant on each other (through referential integrity), it doesn't matter in which order tables are imported. In other words, IMPORT might first import a detail table and the its master - it won't fail.
As you've said that "another" schema already exists (has tables etc.), IGNORE=Y option will suppress error messages regarding CREATE TABLE statements and continue importing data; stored procedures are created as CREATE OR REPLACE, so it doesn't matter, all views are created as CREATE FORCE VIEW - all those objects will automatically recompile when needed.
But, what about referential integrity constraints? Well, I'm not sure about it. If export file doesn't contain too many tables, you might try to manually import tables in required order - master first, detail second (specify them using the TABLES identifier of the IMPORT command, one by one).
However, I might be completely wrong about the whole thing and this might not be the issue at all.
|
|
|
|
|
|
|
|
|