Hi,
Could anyone explain what is going on here.
Many thanks,
Rich.
Programmers are tools for converting caffeine into code
Could anyone explain what is going on here.
Many thanks,
Rich.
Code:
connect sys/pass as sysdba
create role admin_role;
grant insert any table to admin_role;
grant select any table to admin_role;
grant execute any procedure to admin_role;
create user admin01 identified by password;
grant connect to admin01;
grant admin_role to admin01;
alter user admin01 default role connect, admin_role;
grant create table to scratch;
grant create any view to scratch;
--
connect scratch/pass
create table abc
(
IDENT VARCHAR2(30) PRIMARY KEY,
CREATED DATE DEFAULT SYSDATE NOT NULL
);
-- fails? table or view does not exist
-- even though the role has select any priv
create view admin01.abc_v as
select ident, created from scratch.abc;
-- however
connect sys/pass
grant select on scratch.abc to admin01;
connect scratch/pass
-- succeeds
create view admin01.abc_v as
select ident, created from scratch.abc;
Programmers are tools for converting caffeine into code