| Ramesh |
Posted: Jun 23, 2008 02:44:31 AM |
Total Post: 2
Joined: Jun, 2008
|
I need a script for truncating all the Oracle Apps schema tables. It has to take care of all the constraints , parent & child table realtions etc.
It has around 230 schema's in Oracle Apps instance.
regards,
Ramesh |
|
|
Azaz |
| Posted: Jun 23, 2008 06:01:00 AM | |
|
Total Post: 84
Joined: Mar, 2008
|
spool trunc_tab.sql
select 'truncate'
||' '||'table'
||' '||table_name
|| ';'
from dba_tables
where owner='&owner';
spool off
this may help you to truncate all the tables for that schema
select 'Alter Table'||' '||table_name||' '||'Disable Constraint'||' '||index_name||';' from dba_indexes where owner='&owner' ORDER BY TABLE_NAME
select 'Alter Table'||' '||table_name||' '||'Enable Constraint'||' '||index_name||';' from dba_indexes where owner='&owner' ORDER BY TABLE_NAME
this may help you to disable and enable constraints for that particular schema
|
|
|
|
|
Ramesh |
| Posted: Jun 25, 2008 09:04:23 AM | |
|
Total Post: 2
Joined: Jun, 2008
|
Does it take cares of truncating views , indexes etc in that schema?
|
|
|
|
|
Vish |
| Posted: Sep 28, 2008 01:16:12 PM | |
|
Total Post: 84
Joined: Jan, 2007
|
Dear Ramesh
Views and Index are basaed on table. If there are no raw in Table then View and Index will not have any row.
Correct me if i am wrong
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |