over-writing data in oracle 9i [message #85472] |
Wed, 30 June 2004 05:21 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #85508 is a reply to message #85499] |
Sun, 04 July 2004 21:09 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 Go to previous message](/forum/theme/orafaq/images/up.png) |
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
|
|
|