Oracle物化视图权限问题

  • 用户A想刷新用户B的物化视图,必须拥有ALTER ANY MATERIALIZED VIEW 的权限
create tablespace users datafile 'c:\users.dbf' size 10M;

-- we'll create a user that will own the table and materialized view
create user user_a identified by user_a
quota unlimited on users;

-- grant him the privileges necessary for this test
grant create session, create table, create materialized view to user_a;

-- create the user that will be able to refresh user_a's mview
create user user_b identified by user_b;

grant create session, alter any materialized view to user_b;

-- now connect as user_a to create the objects
connect user_a/user_a

-- connected as user_a we create the table and the mview
create table a_table (x int primary key);
create materialized view a_mview as select * from a_table;

-- connect as user_b and refresh it
connect user_b/user_b
begin
dbms_mview.refresh('USER_A.A_MVIEW','c');
end;
/

http://www.itpub.net/thread-715807-1-1.html