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-05-01       - By Stefan Knecht

Reply:     1     2     3     4     5     6     7     8     9     10  

Ahh okay, then there is one part of the confusion we can identify:

SYS is magical, SYS is different.If you connect AS SYSDBA, using any user,
you get into the database as user SYS, and not the actual user you specified
when connecting. And I tend to think that this is the root cause of your
problems. You really, really, really should not use SYS for storing user
data. The same goes for the SYSTEM tablespace, this is reserved for Oracle
database internal data as well.

Could you try issuing the following statements, when you're connected to the
database AS SYSDBA and let me know if this works.

-- 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 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;
/


Stefan

<span class="gmail_quote"></span>Ahh okay, then there is one part of the
confusion we can identify:<br><div style="direction: ltr;"><br> SYS is magical,
SYS is different.If you connect AS SYSDBA, using any user, you get into the
database as user SYS, and not the actual user you specified when connecting.
And I tend to think that this is the root cause of your problems. You really,
really, really should not use SYS for storing user data. The same goes for the
SYSTEM tablespace, this is reserved for Oracle database internal data as well.
<br><br>Could you try issuing the following statements, when you're connected
to the database AS SYSDBA and let me know if this works.<br><br>-- we'll first
create a tablespace to store the table / mview<br>-- here you just have to
replace the path to a valid folder on your computer,
<br>-- I'm assuming you're running Windows, please correct me if I'm wrong<br
>create tablespace users datafile 'c:\users.dbf' size 10M;<br><br>-- we'll
create a user that will own the table and materialized view<br>create user user
_a identified by user_a
<br>quota unlimited on users;<br><br>-- grant him the privileges necessary for
this test<br>grant create session, create table, create materialized view to
user_a;<br><br>-- create the user that will be able to refresh user_a's mview
<br>create user user_b identified by user_b;<br><br>grant create session, alter
any materialized view to user_b;<br><br>-- now connect as user_a to create the
objects<br>connect user_a/user_a<br><br>-- connected as user_a we create the
table and the mview
<br>create table a_table (x int primary key);<br>create materialized view a
_mview as select * from a_table;<br><br>-- connect as user_b and refresh it<br
>connect user_b/user_b<br>begin<br>dbms_mview.refresh('USER_A.A_MVIEW','c');
<br>end;<br>/<br></div><div style="direction: ltr;"><span class="sg"><br><br
>Stefan<br><br><br>

</span></div>