.ora-code.com

Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Refresh materialized view by other user then owner

Refresh materialized view by other user then owner

2006-04-30       - By varciasz
Reply:     1     2     3     4     5     6     7     8     9     10  

>>>> This table and materialized view have been made by user System

>>What about if it's owned by a regular user? This sounds like a very
>>marginal case with a lot that could go wrong.





Hi there,

When user creates his own MView then there is no problem with refreshing it,
but I still have no idea how refresh MView of other user

FOR EXAMPLE:
User "SYSTEM":

   CREATE USER User2
      IDENTIFIED BY ThisIsMySecretPassword;
   GRANT CREATE SESSION TO User2;
   GRANT ALTER ANY MATERIALIZED VIEW to User2;
   GRANT SELECT ANY TABLE to User2;
   GRANT CREATE ANY TABLE to User2;
   GRANT CREATE ANY MATERIALIZED VIEW  to User2 ;
   GRANT DROP ANY MATERIALIZED VIEW  to User2;
   ALTER USER "USER2" QUOTA UNLIMITED ON "SYSTEM";
-- END OF SYSTEM

User "USER2"
   create table My_Table (aa integer primary key);
   create  materialized view My_View as select * from My_Table;    
   begin
       DBMS_MVIEW.REFRESH('My_View','c');
   end;
--END OF USER2

This example works fine but when TABLE and MATERIALIZED VIEW are made by
"SYSTEM" and user "USER2" trying to refresh it by:
   begin
       DBMS_MVIEW.REFRESH('sys.My_View','c');
   end;



then some privileges are needed and error is shown:

   begin
   *
   ERROR at line 1:
   ORA-01031 (See ORA-01031.ora-code.com): insufficient privileges
   ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_SNAPSHOT", line 794
   ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_SNAPSHOT", line 851
   ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_SNAPSHOT", line 832
   ORA-06512 (See ORA-06512.ora-code.com): at line 2


I don't have any idea what privileges are needed because I already tried
almost all of then. What is a meaning of this lines in error (794, 851,
832)? Is there any way to track what privileges are missing?

It not suppose to be so difficult! What's wrong with this Oracle?


Thanks for any help

varciasz












--
http://www.freelists.org/webpage/oracle-l