Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> plsql and dba_constraints
I can run the following fine from the command prompt:
select 'alter table '||table_name||' ENABLE constraint
'||constraint_name as sql_str
from dba_constraints where r_constraint_name IN (select constraint_name from dba_constraints where lower(table_name) = as_table) and lower(table_name) <> as_table;
but get the error: "sys.dba_constraints must be declared" when I put this into a procedure as a cursor:
CURSOR lc_enable IS select 'alter table '||table_name||' ENABLE constraint
'||constraint_name as sql_str
from dba_constraints where r_constraint_name IN (select constraint_name from dba_constraints where lower(table_name) = as_table) and lower(table_name) <> as_table;
Is it forbidden to access the dba tables within a procedure? Received on Tue Jul 06 1999 - 16:10:47 CDT
![]() |
![]() |