.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
Materialized views with fast refresh

Materialized views with fast refresh

2006-04-21       - By Niki Tragen
Reply:     1     2  

Hi

I've been trying to run materialized views from one database to another, ie the
master
tables are not in the same instance as the mat views. I'm using a database link
to
reference the tables in the remote database.  If I use a materialized view
referencing
only one table the view is created ok but as soon as I put a join in the view
it fails
with the error

ORA-12015 (See ORA-12015.ora-code.com) -cannot create a fast refresh materialized view from a complex query.

I've googled on this and made changes to the log creation so to include rowid
and used
these in the select with the join but still get the same error.

If I create the materialized view (using same code with joins) within the same
database
as the logs it works ok.  

Is this a limitation of materialized views or is there something fundamental
that I'm
missing.

I've included the code below.

Thanks for any help

Niki

CREATE MATERIALIZED VIEW LOG ON qlsdba.stcstatd
WITH SEQUENCE,ROWID
INCLUDING NEW VALUES;

CREATE MATERIALIZED VIEW LOG ON qlsdba.stcsessd
WITH SEQUENCE, ROWID
INCLUDING NEW VALUES;

CREATE MATERIALIZED VIEW busfeed.stcstatd_stcsessd_mv
REFRESH FAST ON DEMAND
AS
SELECT
       a.rowid AS stat_rowid
,       b.rowid AS sess_rowid
,       a.aos_code AS curr_code1,
       b.aos_code AS curr_code
,       b.aos_period AS curr_occurrence
,       b.acad_period AS acad_period
/*,     a.full_desc AS curr_full_desc */
/*,     a.short_desc AS curr_short_desc */
/*,     a.dept_code AS dept_code */
/*,     a.aos_type AS curr_type */
FROM
       qlsdba.stcstatd@(protected) a,
       qlsdba.stcsessd@(protected) b
WHERE  
       b.aos_code = a.aos_code /*
AND b.acad_period IN('05/06','06/07')*/
;




Niki Tragen
Oracle DBA, System Support Officer
MIDAS
Manchester Metropolitan University
All Saints Building
Oxford Road
M15 6BH

tel: 0044 161 247 1812
fax: 0044 161 247 6829


"Before acting on this email or opening any attachments you
should read the Manchester Metropolitan University's email
disclaimer available on its website
http://www.mmu.ac.uk/emaildisclaimer "
--
http://www.freelists.org/webpage/oracle-l