Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: plsql and dba_constraints

Re: plsql and dba_constraints

From: Suresh Bhat <suresh.bhat_at_mitchell-energy.com>
Date: Wed, 07 Jul 1999 16:18:59 GMT
Message-ID: <01bec8a5$10533480$a504fa80@mndnet>


Hi -

I am not too sure but in addition to direct privilege on those tables you may need to do it via dbms_sql package.

Suresh

Kent Eilers <kent.eilers_at_pca.state.mn.us> wrote in article <378270D7.47BBFCF6_at_pca.state.mn.us>...
> 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 Wed Jul 07 1999 - 11:18:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US