How to create materialized view log on remote database
How do you create materialized view logs on a remote database.
I tried
create materialized view log on global_express_views.vccs438_project_work_request@h92edwp with sequence, rowid ( columns...)
ERROR at line 1:
ora-00949 illegal reference to remote database
Hi,
I am not getting the error exactly. But have some suggestion:
If the schema owner does not own the master tables, then the schema owner must have the GLOBAL QUERY REWRITE privilege or the QUERY REWRITE object privilege on each table outside the schema.
Hope, this may help you?
Thanx.. Ratan
Similar Messages
-
How to CREATE MATERIALIZED VIEW LOG (MV fast refresh) with some JOINS
Hi @ all,
i'm trying to create a MATERIALIZED VIEW LOG for a fast refresh of a MATERIALIZED VIEW.
It works fine with a simple Request in the MATERIALIZED VIEW:
CREATE MATERIALIZED VIEW MV_ZOTD43_P
TABLESPACE GDII
BUILD IMMEDIATE
REFRESH FORCE AS
SELECT * FROM ZOTD43_P;
COMMIT;
CREATE MATERIALIZED VIEW LOG ON ZOTD43_P
TABLESPACE "GDII"
WITH PRIMARY KEY, ROWID, SEQUENCE INCLUDING NEW VALUES;
call DBMS_MVIEW.REFRESH('MV_ZOTD43_P', 'f');
But when I use a complex SQL-Request with some JOINS (one of the Table with spatial Data) in the MATERIALIZED VIEW, I get an error:
CREATE MATERIALIZED VIEW MV_TEST
TABLESPACE GDII
BUILD IMMEDIATE
REFRESH FORCE AS
SELECT lptd04_p.sst_nr AS sst_nr,
lptd03_p.aaaa AS aaaa,
lptd04_geom.geom as geom
FROM lptd04_p lptd04_p
JOIN lptd01_p lptd01_p ON lptd01_p.cre_nr = lptd04_p.sst_nr
JOIN lptd04_geom ON lptd04_geom.sst_nr = lptd04_p.sst_nr
JOIN lptd03_p lptd03_p ON lptd03_p.lief_nr = lptd04_p.lief_nr;
COMMIT;
CREATE MATERIALIZED VIEW LOG ON LPTD04_P
TABLESPACE "GDII"
WITH PRIMARY KEY, ROWID, SEQUENCE INCLUDING NEW VALUES;
call DBMS_MVIEW.REFRESH('MV_TEST', 'f');
Error report:
SQL Error: ORA-12004: REFRESH FAST kann für Materialized View "GDI"."MV_GDI_SST_STAMM" nicht benutzt werden
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2255
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2461
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2430
ORA-06512: in Zeile 1
12004. 00000 - "REFRESH FAST cannot be used for materialized view \"%s\".\"%s\""
*Cause: The materialized view log does not exist or cannot be used. PCT
refresh is also not enabled on the materialized view
*Action: Use just REFRESH, which will reinstantiate the entire table.
If a materialized view log exists and the form of the materialized
view allows the use of a materialized view log or PCT refresh is
possible after a given set of changes, REFRESH FAST will
be available starting the next time the materialized view is
refreshed.
Am I doing something wrong or is it not possible CREATE MATERIALIZED VIEW LOG when the MATERIALIZED VIEW got some JOINS?
Regards,
GreqThanks for the link Alessandro ,
the error seems something to do with the Column-Type SDO_GEOMETRY, so
i create a new thread in the Spatial Discussion forum:
FAST REFRESHing of Oracle Materialized Views containing SDO_GEOMETRY column
Regards,
Greq -
Is it possible to create materialized view log file for force refresh
Is it possible to create materialized view log file for force refresh with join condition.
Say for example:
CREATE MATERIALIZED VIEW VU1
REFRESH FORCE
ON DEMAND
AS
SELECT e.employee_id, d.department_id from emp e and departments d
where e.department_id = d.department_id;
how can we create log file using 2 tables?
Also am copying M.View result to new table. Is it possible to have the same values into the new table once the m.view get refreshed?You cannot create a record as a materialized view within the Application Designer.
But there is workaround.
Create the record as a table within the Application Designer. Don't build it.
Inside your database, create the materialized with same name and columns as the record created previously.
After that, you'll be able to work on that record as for all other within the Peoplesoft tools.
But keep in mind do never build that object, that'll drop your materialized view and create a table instead.
Same problem exists for partitioned tables, for function based-indexes and some other objects database vendor dependant. Same workaround is used.
Nicolas. -
Error creating materialized view log using DBlink
Hi guys,
I have 2 databases in diferent machines . (machine A and B)
Machine A is my production database and I have a database link in machine B accessing Machine A
CREATE MATERIALIZED VIEW vm_test
BUILD IMMEDIATE
REFRESH FAST ON commit as
select * from test@A
-- no problem in this first operation the materialized view was created sucessfully
Now I need to create the LOG
SQL> CREATE MATERIALIZED VIEW LOG ON test
2 PCTFREE 5
3 TABLESPACE prodemge_2006
4 STORAGE (INITIAL 10K NEXT 10K);
CREATE MATERIALIZED VIEW LOG ON test
ERROR at line 1:
ORA-02050: transaction 5.21.8771 rolled back, some remote DBs may be in-doubt
ORA-02068: following severe error from A
ORA-03113: end-of-file on communication channel
What could be causing this error ?
Thank you,
FelipeORA-02050 transaction string rolled back, some remote DBs may be in-doubt
Cause: Network or remote failure during a two-phase commit.
Action: Notify operations; remote databases will automatically re-sync when the failure is repaired.
ORA-02068 following severe error from stringstring
Cause: A severe error (disconnect, fatal Oracle error) was received from the indicated database link. See following error text.
Action: Contact the remote system administrator.
M.S.Taj -
CREATE MATERIALIZED VIEW LOG ON / SNAPSHOT LOG ON
HI,
Is there any difference between create materialized view log on and creat snapshot on.
Did some googling, found out that: A snapshot log is a table associated with
the master table of a snapshot and Is used for refresh the master table\'s snapshots.
Materialized view log is a table associated with the master table of a materialized view. Seem like the same.
By the way, are these tables important? Will my database function as normal without these view log.
regards,
becksWhere did you pick up this syntax from ?
The MV Log that will be created on DOCUMENT will be called MLOG$_DOCUMENT.
So, the correct syntax is :
create materialized view log on DOCUMENT with primary key;this will create a "table" called MLOG$_DOCUMENT which serves as the Materialized View Log on the real table called DOCUMENT. This will allow you to create one or more Materialized Views based on DOCUMENT, which can be fast refreshed because of the presence of the MV Log. For example :
create materialized view MV_DOCUMENT refresh fast on demand as select DOC_ID, DOC_DATE from DOCUMENT;(i.e. assuming you want an MV that has only two columns from the table DOCUMENT.
Hemant K Chitale
http://hemantoracledba.blogspot.com -
CREATE MATERIALIZED VIEW LOG ERROR
Quick question:
This doesn't work:
CREATE MATERIALIZED VIEW LOG ON STOCKMOVES
NOCACHE
LOGGING
NOPARALLEL
WITH PRIMARY KEY, (ITEMKEY,WAREHOUSE,AGENT,DOCUMENTID,STATUS,RATE,PRICE,DISCOUNTPRC,SUPPLYQUANTITY)
INCLUDING NEW VALUES
Fails with "ORA-00922: missing or invalid option" and points to "(ITEMKEY"
Can't find what's wrong.Comma after PRIMARY KEY is not required.
Regards,
Archana
"While one person hesitates because he feels inferior, the other is busy making mistakes and becoming superior."
http://justoracle.blogspot.com/
----------------------- -
Create materialized view log with rowid hangs indefinitely..
Hi
create materialized view log on advice_note with rowid;
This stmt hangs indefinitely...
Help needed in resolving this issue
Rpi have resolved the issue myself.
Found out the sessions that are locking the object , killed all those sessions & pids.
Rp -
Bug: Can not create materialized view log on 11G XE
Hi,
I log in as HR user and try create materialized view log
CREATE MATERIALIZED VIEW LOG ON HR.EMPLOYEES;I get error
>
Error starting at line 1 in command:
CREATE MATERIALIZED VIEW LOG ON HR.EMPLOYEES
Error at Command Line:1 Column:0
Error report:
SQL Error: ORA-00439: feature not enabled: Advanced replication
00439. 00000 - "feature not enabled: %s"
*Cause: The specified feature is not enabled.
*Action: Do not attempt to use this feature.
>
You can create materialized view log on 10G XE without any problem.
Regards,
Jari
http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0Is it a bug in 11g or 10g?
It was reported earlier in now archived beta forum. {thread:id=2214092}
The current doc lists MV sites only (and "No" for Advanced Replication feature):
http://download.oracle.com/docs/cd/E17781_01/license.112/e18068/toc.htm#BABDFDAI -
How to create materialized view based on a view?
Hi,
I hope this is not very far fetched idea.
I have a very complex view and I would like to replicate it 'in place' that is I would like to make a materialized view that is based on this view complex view. I would like to use this materialized view (i.e table) to query data instead of using the original view, since it takes Oracle some 10-15 seconds to execute my query on the original view and I am not allowed to create indexes on most of the tables that are included in the original view.
Can this be done?
Best regards,
Tamas SzecsyThe best way to do this is to create a materialzed view based on the underlying code of the original view. If you don't have this handy, issue the following in sqlplus:
select text
from user_views
where view_name = 'NAME_OF_VIEW'
You can then cut and paste the sql statement into your create materialized view statement.
Please note, you will probable have to set the long parameter to a higher value to reveal the complete statement for example:
SQL> set long 2048 -
How to create materialized view based on a synonym
Hi all,
I am trying to create simple materialized view based on a synonym and that synonym is pointing a view in other database (using dblink). I am getting table or view not found error . I am able to select synonym if i use select but not in materialized view. Please help me.
Thanks,The best way to do this is to create a materialzed view based on the underlying code of the original view. If you don't have this handy, issue the following in sqlplus:
select text
from user_views
where view_name = 'NAME_OF_VIEW'
You can then cut and paste the sql statement into your create materialized view statement.
Please note, you will probable have to set the long parameter to a higher value to reveal the complete statement for example:
SQL> set long 2048 -
Create Materialized View based on another database table using db link?
SQL> SELECT sysdate
2 FROM dual@CBRLINK ;
SYSDATE
21-NOV-12
SQL> CREATE MATERIALIZED VIEW USERCBR.V_T24_COUNTRY1
2 REFRESH COMPLETE
3 START WITH SYSDATE NEXT SYSDATE + (5/24)
4 AS
5 SELECT sysdate
6 FROM dual@CBRLINK ;
CREATE MATERIALIZED VIEW USERCBR.V_T24_COUNTRY1
ERROR at line 1:
ORA-04052: error occurred when looking up remote object SYS.DUAL@CBRLINK
ORA-00600: internal error code, arguments: [ORA-00600: internal error code,
arguments: [qksfroFXTStatsLoc() - unknown KQFOPT type!], [0], [], [], [], [],
ORA-02063: preceding line from CBRLINKIt works for me:orcl>
orcl> CREATE MATERIALIZED VIEW scott.V_T24_COUNTRY1
2 REFRESH COMPLETE
3 START WITH SYSDATE NEXT SYSDATE + (5/24)
4 AS
5 SELECT sysdate
6 FROM dual@l1 ;
Materialized view created.
orcl> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
orcl>so there is no problem with the code. HTH. -
Query Rewrite to Utilize Materialized Views on a Remote Database
We have our materilized views stored at a remote database. Is there a way to utilize query rewrite to rewrite the queries issued on the local database such that queries will refer the materialized views at a remote db?
From the documentation, I already know that the base tables for MVs and MVs should eside in the same instance or the query should be submitted on the instance where MVs reside if base tables are residing in a different remote DB to benefit from query rewrite.
My aim is to utilize query rewrite to reduce the workload on a primary database by passing queries that can be rewritten to use MVs on a remote DB.
Thanks for the guidance,My aim is to utilize query rewrite to reduce the workload on a primary database by passing queries that can be rewritten to use MVs on a remote DB. If you know that MVs are not stale or acceptable of staled data and don't see network bandwidth problems (small set of result), You would try accessing MV tables directly on remote db using dblinks.
-
Materialized view logs in cloned database
Hi all!
We have materlialized views and materlialized view logs in two separate databases which are connected with a database link. The MV logs are in DB1_PROD, which is the database being cloned. The database link goes from DB2_PROD (where the MVs are located) to DB1_PROD:
DB2_PROD (materialized views) ----DB link---> DB1_PROD (materialized view logs)
When cloning DB1_PROD to DB3_DEV, the MV logs still have a reference to DB2_PROD. However, there is no connection between DB3_DEV and DB2_PROD.
In my opinion this is not harmful, but I would like to know if any of you can see any problems with this.
In summary;
DB1_PROD: Materialized view logs
DB3_DEV: Materialized view logs. Clone of DB1_PROD
DB2_PROD: Materialized views.
DB1_PROD and DB3_DEV:
select * from v$version;
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
DB2_PROD:
select * from v$version;
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - ProductionPlease let me know if you need further information.Oracle automatically purges rows in the materialized view log when they are no longer needed. Because Oracle must wait for all dependent materialized views to refresh before purging rows from a materialized view log, unwanted situations can occur that cause a materialized view log to grow indefinitely when multiple materialized views are based on the same master table or master materialized view.
For example, such situations can occur when more than one materialized view is based on a master table or master materialized view and one of the following conditions is true:
Materialized view is not configured for automatic refreshes and has not been manually refreshed for a long time. OR
Materialized view has an infrequent refresh interval, such as every year, etc
You can also refresh the materialized views associated with the log so that Oracle can purge rows from the materialized view log.
If a materialized view log needs to be purged manually for some reason a procedure called DBMS_MVEW.PURGE_LOG can be used.
Edited by: user130038 on Sep 30, 2011 6:49 AM -
How to create materialized view with parameter and index ?
Hi all,
i am using oracle 11g.
i want to create parameter materialized view with two parameter (STORED_VALUE, LOV_NAME) with an index .
i have below view
CREATE OR REPLACE FORCE VIEW SR_MY_TEST(DISPLAYED_VALUE, STORED_VALUE, LOV_NAME) AS
SELECT DISPLAYED_VALUE , LOVVALUE.STORED_VALUE , lovname.lov_name
FROM (SELECT T.LOV_VALUE_ID,
T.LOV_ID,
T.ORG_ENTITY_ID,
T.STORED_VALUE,
T.DISPLAYED_VALUE,
T.ENTERPRISE_ID
FROM MS_QS_LIST_OF_VALUES_T T) lovvalue, ms_qs_lov_names lovname
WHERE lovvalue.lov_id = lovname.lov_id
AND lovvalue.org_entity_id = 1
and LOVVALUE.ENTERPRISE_ID = 100000
AND LOVNAME.ENTERPRISE_ID = 100000;
i want to create index on STORED_VALUE, LOV_NAME
Thanks
DambyNo.AFAIK, there's nothing called as "parameterized MV".
Materialized View store data like tables (and not like Views). So, does it make sense when you say - "table with parameters" ?
Could you please explain your business requirement?
What is the purpose behind those 2 parameters? -
How do I use Primary Key and RowID in Materialized View Logs and MVs
How do I use Primary Key and RowID in Materialized View Logs and Materialized Views????
I donât understand in the Materalized View Logs the diference between Primary Key and RowID. Besides, I could choose both Primary Key and RowID.
When I have to use RowID?? Why?? And Primary Key??? And both, Primary Key and RowID????
Thank you very much!Yes, I have already read it...
But for example I donât Understand:
This is the example 8-1
CREATE MATERIALIZED VIEW LOG ON products
WITH SEQUENCE, ROWID
(prod_id, prod_name, prod_desc, prod_subcategory, prod_subcat_desc, prod_
category, prod_cat_desc, prod_weight_class, prod_unit_of_measure, prod_pack_
size, supplier_id, prod_status, prod_list_price, prod_min_price)
INCLUDING NEW VALUES;
But if I create a Materialized View with TOAD if I choose a KEY field I receive the error:
ORA-12026: invalid filter column detected
Then I have to take out the Key (in the above example prod_id)
And then the script is
CREATE MATERIALIZED VIEW LOG ON products
WITH ROWID, SEQUENCE, PRIMARY KEY!!!!!!!!!!!!!!!!!!!!
(prod_id, prod_name, prod_desc, prod_subcategory, prod_subcat_desc, prod_
category, prod_cat_desc, prod_weight_class, prod_unit_of_measure, prod_pack_
size, supplier_id, prod_status, prod_list_price, prod_min_price)
INCLUDING NEW VALUES;
I have PRIMARY KEY in the definition (I donât choose it) and I donât have the prod_id field
Why is it????
Note: If I execute the script to create the MV Log manually the PRIMARY KEY option NO IS in the script and the prod_id field either is in the script.
And on the other hand,
What is this:
CREATE MATERIALIZED VIEW LOG ON sales
WITH ROWID;
CREATE MATERIALIZED VIEW LOG ON times
WITH ROWID;
CREATE MATERIALIZED VIEW LOG ON customers
WITH ROWID;
These MATERIALIZED VIEW LOG contain any fields????
Or it contain the primary key fields of this tables (sales, times and customers)??? Then, Why is it ROWID instead of PRIMARY KEY????
Thanks!
Maybe you are looking for
-
Report for duplicate PO and Sales Order
Hi All, I need to find out two reorts for below purpose: 1) Report that will give me list of all PO's which has duplicate sales order against them . 2) Report that will give me list of all sales order which has duplicate PO's . I know there is a rep
-
Regarding crystal report basic 2008
Dear sir, i had created two commands in crystal report and retrieving data using where conditions in select query . and after that i also clear all link between two commands but still it takes the link automatically and i am not able to get my real
-
How to use session to passing data from one JSP to another JSP
Dear All, I had create 2 jsp web page and want to do this: 1. input some data into the text box and click the submit button, the jsp page will open another jsp page and send the text box data to the new open jsp page. can any one tell me how to open
-
Where I can find Logic pro 7.1 upgrade
I acquired Logic pro 7 software, which I use on PPC G4 computer with Pro Tools Mix++ system. I would like to find 7.1 upgrade. This was actualy free upgrade, Apple sold it for 20$ on DVD (shipping costs).
-
how do I get this resolved?