Import without dropping tables [message #309015] |
Wed, 26 March 2008 04:04 |
andi_raj
Messages: 55 Registered: February 2008
|
Member |
|
|
I want to import/export tables between two PCs with same user name. while doing import i have to drop all the tables then import because new datas are not getting appended. each and every time i have drop all the tables. is there any way? kindly help. thanx in advance.raj
|
|
|
|
Re: Import without dropping tables [message #309053 is a reply to message #309015] |
Wed, 26 March 2008 05:30 |
andi_raj
Messages: 55 Registered: February 2008
|
Member |
|
|
what should i do myself? okay let me put it in this way. PC 1 - one table 10 rows. i add two rows. PC-2 same user, same table 10 rows. If import the table from PC 1 into PC2 with out dropping only 10 rows are there. The newly added two rows are not getting loaded. what should i do? thanks in advance. raj
|
|
|
|
Re: Import without dropping tables [message #309074 is a reply to message #309053] |
Wed, 26 March 2008 06:36 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
andi_raj | The newly added two rows are not getting loaded
| Yes, they are. Eventually.
Here's an example: I have precreated both tables (one in Scott's, and the other one in Mike's schema) and inserted several records (note that there are NO unique constraints there!):SQL> connect scott/tiger@ora10
Connected.
SQL> select * From test;
ID
----------
1
2
SQL> connect mike/lion@ora10
Connected.
SQL> select * From test;
ID
----------
0
1
SQL>
Now, exporting Scott's table (excerpt):M:\>exp scott/tiger@ora10 tables=test file=test.dmp
. . exporting table TEST 2 rows exported
Let's import it into Mike's schema (excerpt):M:\>imp mike/lion@ora10 file=test.dmp ignore=y full=y
. importing SCOTT's objects into MIKE
. importing SCOTT's objects into MIKE
. . importing table "TEST" 2 rows imported
Now let's check how it looks like:M:\>sqlplus mike/lion@ora10
SQL> select * from test;
ID
----------
0
1
1
2
SQL>
If I'm not wrong, Scott's records ARE appended to Mike's ones. There would be unique key constraint violation if it existed (so record with ID = 1 would fail to be imported).
If this example doesn't help, could you post YOUR OWN example so that we could see what you are doing (and, possibly, what you'd like to achieve).
[Updated on: Wed, 26 March 2008 06:37] Report message to a moderator
|
|
|
Re: Import without dropping tables [message #309383 is a reply to message #309015] |
Thu, 27 March 2008 04:58 |
andi_raj
Messages: 55 Registered: February 2008
|
Member |
|
|
hi thanks a lot for explaining with an example. here's the scenario.
pc : 1
user: raj
table:t1
id
--
1
2
3
4
pc : 2
user:raj
table:t1
id
--
1
2
when i export from pc1 and import into pc2 the result should be as follows:
pc :2
user:raj
table:t1
id
--
1
2
3
4
is it possible? thanx. raj
|
|
|
|
|