oracle - Check table names of other users -
i'm in data migration , i've been request check table names, don't have dba permissions , user_table view not useful because tables other user. idea make a query (i'm using oracle sql developer):
create global temporary table table_exist (name varchar(50), exist varchar(15)) on commit delete rows / declare v_exist number; begin select (1) v_exist schema.table rownum =1; insert table_exist (name, exist) values ('table','exist'); exception when others insert table_exist (name, exist) values ('table','not_exist'); end; / select * table_exist; / drop table table_exist;
the issue when table don't exist sql ignore exception block here error get:
informe de error - ora-06550: línea 5, columna 55: pl/sql: ora-00942: la tabla o vista no existe ora-06550: línea 5, columna 3: pl/sql: sql statement ignored 06550. 00000 - "line %s, column %s:\n%s" *cause: pl/sql compilation error. *action: no se ha seleccionado ninguna fila table table_exist borrado.
can tell me why error , why sql don't read exception block? (i don´t have experience in sql oracle).
thaks, hope can me.
there 3 versions of various catalog views: dba_, user_, , all_. need query all_tables
(not user_tables
shows own tables, , not dba_tables
since don't have dba powers). all_tables
show tables have been granted permission see, including other users.
perhaps of tables "need" see won't able see, because don't have necessary permissions. sign there mismatch between asked , powers given; there no "technological" way around it, become business issue.
Comments
Post a Comment