Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Constraints confusions

unknown-1052419May 29 2014 — edited May 29 2014

Hi all,

11.2.0.3

I want to disable constraints of all tables when importing all tables in HR schema. I created disable scripts using the dba_constraints view as:

select 'ALTER TABLE '||OWNER ||'.'|| TABLE_NAME || ' disable constraint '|| CONSTRAINT_NAME ||';' from dba_constraints where OWNER = 'HR';

I can not understand why my result contains an VIEW with contraints? Hence my script has error.


select owner,table_name,constraint_name,status from dba_constraints where OWNER = 'HR' and table_name='VW_CHANGEMP'

HR VW_CHANGEMP SYS_C0011953 ENABLED


select * from dba_objects where object_name='VW_CHANGEMP'

HR VW_CHANGEMP 76642 VIEW


ALTER TABLE HR.VW_CHANGEMP enable constraint SYS_C0011953;

*

ERROR at line 1:

ORA-00942: table or view does not exist

Please help why a view IS INCLUDED in dba_constraints table?



Thanks,

pK

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2014
Added on May 29 2014
12 comments
3,995 views