Home » RDBMS Server » Backup & Recovery » problem on db import (oracle portal)
problem on db import (oracle portal) [message #182007] Wed, 12 July 2006 10:08 Go to next message
mfran2002
Messages: 8
Registered: July 2006
Junior Member
hi
i'm trying to import a dump file in my oracle portal (oracle 9i) but i've some problem

here is what i 'm doing

export:
exp USERID=system/manager@db BUFFER=100000 FILE=d:\exp.dmp FULL=Y DIRECT=Y LOG=d:\exp.log

import:
imp USERID=system/manager@db BUFFER=100000 FILE=d:\exp.dmp FULL=Y IGNORE=Y LOG=d:\IPB.log

i've tried to use ignore=Y but it only import new rows, not modify or delete existing ones.
what do you mean about truncating?
i think i need to empty my tables before import...but i don't know i can do it....


where's my mistake?
is there a simpler way?

thanks
Re: problem on db import (oracle portal) [message #182019 is a reply to message #182007] Wed, 12 July 2006 10:45 Go to previous message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
If you indicate ignore errors = y then when an imported row matches an existing row it does not try to import that row.

If you do not care what is in the database at the time of import, then truncate all tables belonging to the scema owner (don't mess with the system tables).
(truncate table <yourtable>;)

For Unix:
sqlplus
username: <scemaowner>
password: <that password>
set output truncate.txt
set linesize 100
set pagesize 0
select 'truncate table ' || table_name || ';'
from dba_tables
where owner = '<your scema owner>'
order by table_name;
commit;
exit;
It is very important to use the where clase above!

Then edit out the sql statement above and run the created script named truncate.txt you just created:

sqlplus
username: <scema owner>
password: <your password>
@truncate.txt
commit;
exit;

As for mergeing changed or existing data, I think you may be looking at a program instead of the imp utility. In a program or procedure you can determine what to do when importing a row that already exists.
Neil.

[Updated on: Wed, 12 July 2006 10:47]

Report message to a moderator

Previous Topic: error while recover database
Next Topic: database link create but not fatch data from link database give me this err
Goto Forum:
  


Current Time: Sun Nov 24 11:50:39 CST 2024