Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Refresh materialized view by other user then owner

Re: Refresh materialized view by other user then owner

From: Stefan Knecht <knecht.stefan_at_gmail.com>
Date: Mon, 1 May 2006 20:42:09 +0200
Message-ID: <486b2b610605011142lee4551eyf694984c8d17727e@mail.gmail.com>


Hi

you really shouldn't be needing a quota on SYSTEM... Try setting the user's default tablespace instead:

create user user_a identified by user_a
quota unlimited on My_Tablespace
default tablespace My_Tablespace;

No users should have system as their default tablespace actually, my mistake for not specifying this, did the test on 10g having the database-wide default tablespace so I left it out and it still worked for me :)

Stefan

On 5/1/06, varciasz <varciasz_at_gmail.com> wrote:
>
> Hello,
>
> Thanks, this example after few correction works OK.
> I really don't know what's wrong with schema SYS .
>
> Below full, working script.
> All changes:
> You forget to put Table and MView to created Tablespace,
> It was also needed to give
> quota unlimited on SYSTEM;
> to user_a. I don't know why and what for this is needed but without it
> Oracle shows that I don't have privileges on tablespace SYSTEM
>
>
>
>
>
> Connect system/***@My_DB AS SYSDBA
>
>
> -- we'll first create a tablespace to store the table / mview
> -- here you just have to replace the path to a valid folder on your
> computer,
> -- I'm assuming you're running Windows, please correct me if I'm wrong
> create tablespace My_Tablespace datafile 'c:\My_Tablespace.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 My_Tablespace
> quota unlimited on SYSTEM;
>
> -- 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)
> tablespace My_Tablespace;
> create materialized view a_mview tablespace My_Tablespace 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;
> /
>
>
>
> THANK YOU VERY MUCH FOR HELP
>
>
> Best Regards
>
> varciasz
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 01 2006 - 13:42:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US