Home » Developer & Programmer » Forms » over-writing data in oracle 9i
over-writing data in oracle 9i [message #85472] Wed, 30 June 2004 05:21 Go to next message
Puneet Bhatia
Messages: 7
Registered: February 2004
Junior Member
Friends ,

I am using an oracle 9i database which has some old data. I want to over-write that data with the latest data in the .dmp file.

could you please advise how can I do it.

 

Thanx

PB
Re: over-writing data in oracle 9i [message #85499 is a reply to message #85472] Fri, 02 July 2004 04:41 Go to previous messageGo to next message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Truncate your tables in the Database & import the dump file with option IGNOR=Y in import command line parameter.

Regards
Himanshu
Re: over-writing data in oracle 9i [message #85508 is a reply to message #85499] Sun, 04 July 2004 21:09 Go to previous messageGo to next message
puneet
Messages: 76
Registered: August 2002
Member
thanx Himanshu ,
but I have different schemas with more than 150 tables. do i need to truncate every table separately or can you advise any command to truncate all the tables in one scheman in one go.

thanx
PB
Re: over-writing data in oracle 9i [message #85513 is a reply to message #85508] Mon, 05 July 2004 04:59 Go to previous message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
Excute following script for each of the Schema & then run import as per your requirement.

set heading off
set pagesize 0
spool 1
select 'alter table '||table_name||' disable constraint '||constraint_name||' ;'
from user_constraints
/
spool 2
select 'Truncate table '||object_name||' ;'
from user_objects where object_type ='TABLE'
/
spool off
@1.lst
@2.lst

Regards
Himanshu
Previous Topic: urgent
Next Topic: Triggers
Goto Forum:
  


Current Time: Fri Sep 06 13:36:47 CDT 2024