| Compilation Issue [message #575034] |
Fri, 18 January 2013 03:25  |
 |
sgollapudi
Messages: 9 Registered: January 2013 Location: HYDERABAD
|
Junior Member |
|
|
Hello All,
When I executed update on scott.emp on other schema say ELIXIR schema it is getting executed properly but
when I write that statement inside a procedure in ELIXIR schema it is failing.Then I verified on sys priveleges for ELIXIR
it has update any table privilege is there but it has not privileges on emp table. then what is the reason for that failing inside procedure but not
while executing update statement.
SQL> SHO USER
USER is "ELIXIR "
SQL>
SQL> update scott.emp set sal=100 where deptno=20;
5 rows updated.
SQL>
SQL> create or replace procedure sp1 as
2 begin
3 update scott.emp set sal=100 where deptno=10;
4 commit;
5 end;
6 /
Warning: Procedure created with compilation errors.
SQL>
SQL> SHO ERR
Errors for PROCEDURE SP1:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/1 PL/SQL: SQL Statement ignored
3/14 PL/SQL: ORA-01031: insufficient privileges
SQL>
SQL> select * from dba_sys_privs where privilege like '%TABLE%' AND GRANTEE='DBO';
GRANTEE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
ELIXIR SELECT ANY TABLE NO
ELIXIR DROP ANY TABLE NO
ELIXIR COMMENT ANY TABLE NO
ELIXIR UNLIMITED TABLESPACE YES
ELIXIR CREATE ANY TABLE NO
ELIXIR ALTER ANY TABLE NO
6 rows selected.
SQL> select * from dba_tab_privs where table_name='SCOTT'
2 ;
no rows selected
Thanks in advance.
sgollapudi.
|
|
|
|
|
|
|
|
|
|