Home » RDBMS Server » Security » Why dose a user granted dba role do not has select any table privilege in procedure?
Why dose a user granted dba role do not has select any table privilege in procedure? [message #41203] Tue, 10 December 2002 01:52 Go to next message
zhangjin
Messages: 3
Registered: December 2002
Junior Member
Why a user granted dba role can't select any table in procedure?

I create a user xy and grant dba to it.
There is table named zj_test in the schama unitele ,when i connect as xy by sqlplus,i can see the table unitele.zj_test
but,when i create a procedure ,it seemed that the procedure can't find the table unitele.zj_test;
after i grant select any table to xy,the procedure complied well;

but why ? Does the role dba can't work well in procedure?

SQL> create user xy identified by xy;

SQL> grant dba to test;

SQL> connect xy/xy;
Connected.
SQL> insert into unitele.zj_test values ('adsfas');

1 row created.

SQL> commit;

Commit complete.

SQL> select * from unitele.zj_test;

A
--------------------------------------------------------------------------------
adsfas

SQL> create or replace procedure zj_test_p1
2 as
3 begin
4 insert into unitele.zj_test values ('asdfa');
5 commit;
6 end;
7 /

Warning: Procedure created with compilation errors.

SQL> show errors
Errors for PROCEDURE ZJ_TEST_P1:

LINE/COL ERROR
-------- -----------------------------------------------------------------
4/1 PLS-00201: identifier 'ZJ_TEST' must be declared
4/1 PL/SQL: SQL Statement ignored
Re: Why dose a user granted dba role do not has select any table privilege in procedure? [message #41211 is a reply to message #41203] Tue, 10 December 2002 06:07 Go to previous message
Rick Cale
Messages: 111
Registered: February 2002
Senior Member
ROLES are disabled in procedures. Any privs you want
a user to have while running a procedure must be granted explicitily not via a role.
Previous Topic: forgot password
Next Topic: Oracle system created DBA role dropped by accident
Goto Forum:
  


Current Time: Tue May 24 10:31:03 CDT 2022