Hello,
I am fairly new to pl/sql programming and I have a problem...
I have a simple procedure which I want to create. It would have to go through all the check constraints and rename them to something more readable than SYS_00999;
I have already come this far:
The problem is that when I want to execute this procedure I get the error 'table or view does not exist'. The oracle user which creates the procedure has a 'select any table' grant and I also get the results I want when I run the query on itself.
What am I doing wrong here?
Greetz,
OraMim
I am fairly new to pl/sql programming and I have a problem...
I have a simple procedure which I want to create. It would have to go through all the check constraints and rename them to something more readable than SYS_00999;
I have already come this far:
Code:
create or replace procedure RENAME_CHECKS is
begin
execute immediate 'create global temporary table TMP on commit delete rows as select t.* from sys.dba_cons_columns t where owner = ''OWNER'' and constraint_name in (select constraint_name from SYS.all_constraints where owner = ''OWNER'' and constraint_type = ''C'')';
execute immediate 'drop table TMP';
end RENAME_CHECKS;
The problem is that when I want to execute this procedure I get the error 'table or view does not exist'. The oracle user which creates the procedure has a 'select any table' grant and I also get the results I want when I run the query on itself.
What am I doing wrong here?
Greetz,
OraMim