Unable to refresh Mat View
BANNER (ADB)
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
BANNER (MDB)
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
Hello everyone,
I'm unable to refresh a mat view in MDB which is based on ADB. Even just after creating it everytime the refresh fails.
Currently I'm re-creating the mat view daily and then point the synonym to new one.
There are no errors thrown in session. It just times out.
Below is the script for the same.
CREATE MATERIALIZED VIEW MDB.MV_APRP_DTL_JUN02
TABLESPACE MCCI_DATA
BUILD IMMEDIATE
USING INDEX
REFRESH FAST START WITH SYSDATE+12/24 NEXT SYSDATE+1
WITH ROWID
AS
SELECT /*+ PARALLEL (APREP_DTL,6) */ * FROM prp.aprep_dtl@mdb_adb prep_del_dtl;
Can anybody tell me how can I atleast find what and where the problem is ?
Thanks
Jitu J K
If you currently are dropping and recreating the MV, you don't need the MV Log.
Drop and recreate the MV Log before you recreate the MV and then retest performance of FAST refresh's. A 600MB MV Log does mean that something has gone wrong. Do you / Did you have other MVs that were also extracting data from the same base table(s) ? If those MVs have stopped refreshing but did not unregister, the MV Log will continue to grow and your current MV's FAST refresh performance will suffer.
See Oracle Support Note#1031924.6 and
http://hemantoracledba.blogspot.com/2007/01/large-growing-snapshot-logs-indicate.html
Note : Before you drop the MV log confirm that there are no other MVs (in the same database or a remote database) that are built on the same base table(s).
Hemant K Chitale
Similar Messages
-
Unable to refresh Materialized view group when an Mview is added
Hi,
I have 8 MVs present in my DB and added them to a MV refresh group. But I am getting the error below when I try to refresh the group.
SQL> exec DBMS_REFRESH.refresh('MVRFRSHGRP_EAIGHD');
begin DBMS_REFRESH.refresh('MVRFRSHGRP_EAIGHD'); end;
ORA-12048: error encountered while refreshing materialized view "MYUAT"."MV_EAI_PJRM_EMP_ALLOC_DTLS"
ORA-12018: following error encountered during code generation for "MYUAT"."MV_EAI_PJRM_EMP_ALLOC_DTLS"
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2563
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2776
ORA-06512: at "SYS.DBMS_IREFRESH", line 685
ORA-06512: at "SYS.DBMS_REFRESH", line 195
ORA-06512: at line 1
SQL> Actually the view MV_EAI_PJRM_EMP_ALLOC_DTLS exists and MVlog$ are present at source site.
When I remove this view from the group, I am able to refresh it successfully.
I destroyed the group, recreated and added all the views and tried. But no luck.
Can some one suggest what could be the problem?
Regards
DeepHi,
You didn't leave a version (Again), so I can only guess.
You may be suffering from
Bug 10096159 ORA-12048 error message raised by DBMS_REFRESH.REFRESH is not corrrect
Meaning it could be a different MV that fails to refresh.
Regards
Peter
Edit:
Versions confirmed as being affected (There could be others, mind)
11.2.0.1
11.1.0.7
10.2.0.5
10.2.0.3
Edited by: Peter on Sep 4, 2012 8:45 AM -
USER UNABLE TO REFRESH DISCOVERER REPORT IN DISCOVERER DESKTOP 10g
Dear All,
HELP!!!
A new user is unable to refresh discoverer Reports in Desktop. All priviledges have been granted to username in Disco Admin and Usre is able to log into oracle Apps.
On the PC the user logged into someone else can log into Discoverer Desktop and run/refresh discoverer reports without any issues. Hence Ithink neither the PC nor the Discoverer installation is the problem.
Can anyone help? What setup/profile needs to be completed in order for the user to be able to run Disco reports.
Pls note that the following has been completed:
1. Business Areas Assigned to user and his responsibilities.
2. Desktop/Plus Privileges assigned.
3. Allow administration - DISABLED - NOT TICKED
Many thx
DIDoes this person just need to run reports? Or does this person also need to create reports? If the person just needs to run reports, try using Viewer for that person, rather than Desktop. This may be something that you need to log a service request with Oracle to get resolved. Pretty strange that can bring items into a new worksheet, but it won't run. Maybe there is an Oracle applications security issue (since logging in as another person does work)? You may be beating your brains out trying to find a Discoverer problem when it might be an application security problem. Though this is a wild guess on my part.
John Dickey -
Unable to refresh a report in P21 Activant
We recently upgraded our Activant P21 (Prophet 21) software which includes Crystal Reports. Standard P21 canned reports in their software can be viewed, exported and printed. The P21 software includes a feature to create and link custom reports. We create the custom reports with Crystal Reports 2008 and set up the external report links. We can open, view, print and export the custom reports but when we refresh the report with or without an input parameters, we are prompted for a "Database Login" password. When we enter our password, an error message titled "Crystal Report Windows Forms Viewer" states "Logon Failed. Please try again". We have contacted Activant about this issue and they do not find any errors in the set up. They have told us there is probably an issue with Crystal Reports and asked us to contact your company. We have also contacted a friendly competitor who uses the same Activant P21 software and create custom reports with Crystal Reports 2008 which include user input parameters. Their custom reports work without a glitch. What would prevent us from refreshing a custom Crystal report?
Hi Don,
Activant P21 is insisting our issue is a Crystal problem. We are unable to refresh the reports inside their software. We have tried every user id and password we know and it still will not refresh our CR report.
When we use CR2008 to refresh a report, a window opens titled "OLE DB (ADO)" and asks to choose a data source "ODBC Data Source....Choose a data source from the list" We select our ODBC DSN: P21 Live and click next. Another window opens titled "OLD DB (ADO) asking for a password "Connection Information...Provide necessary information to log on to the chosen data source." At this point it does not matter what "User ID" or "Password" we use, the report will refresh. We have used the Adminstrator with a password, we used my user name and password and we used the administrator without a password and in all three instances, the report refreshed with the correct data.
I don't see how this is a Crystal problem unless there is something I am missing. Any help you can provide will be deeply appreciated.
Bob -
Creating a Mat View having the same name with that of the table name
Hi everyone,
After dropping the mat view name "QQ.TRDLN_DIM_MV", I'm trying to re-create it by having the same name as that of the table but I got an error stating that "name is already used by an existing object". How can create a mat view to look like the object owned by schema "GQ", having a name that is the same as that of the table name, without dropping the table?
OWNER_O OBJECT_TYPE CREATED LAST_DDL_ TIMESTAMP STATUS OBJECT_NAME
===
GQ MATERIALIZED VIEW 05-NOV-08 13-DEC-08 2008-11-05:06:31:46 VALID TRDLN_DIM_MV
GQ TABLE 05-NOV-08 15-DEC-08 2008-11-05:06:31:00 VALID TRDLN_DIM_MV
QQ TABLE 17-AUG-07 16-MAR-09 2007-08-17:17:05:21 VALID TRDLN_DIM_MV
SQL>CREATE MATERIALIZED VIEW QQ.TRDLN_DIM_MV
2 TABLESPACE FPLC01S
3 NOCACHE
4 NOLOGGING
5 COMPRESS
6 PARALLEL ( DEGREE 2 INSTANCES 1 )
7 BUILD IMMEDIATE
8 REFRESH FORCE ON DEMAND
9 WITH PRIMARY KEY
10 AS
11 select /*+ NO_REWRITE */ trdln_id,
12 trdln_skid,
13 trdln_end_date,
14 first_value(trdln_end_date) over (partition by trdln_id order by trdln_end_date DESC) as MaxDate
15 from QQ.trdln_dim;
from QQ.trdln_dim
ERROR at line 15:
ORA-00955: name is already used by an existing object
I appreciate your help. Many thanks in advance!
Regards,
RadicYou'd have to rename the table (using ALTER TABLE tablename RENAME TO othername; ) before you create the MV.
You can't have both existing with the same name in the same schema.
What you see in the GQ schema is that the "table" is the underlying table for the Materialized View.
When you do a CREATE MATERIALIZED VIEW MY_MV AS ...
Oracle creates two objects with the same name, one being the Materialized View MY_MV and the other being the table MY_MV which is the physical storage. {Remember that a Materialized View is a means of getting a physical representation of a View}.
In the QQ schema what you have is either
a. a real Table
or
b. an improperly dropped MV, resulting in the underlying Table still present. -
Error While Creating Fast Refresh Materialized view.
Table Scripts:
CREATE TABLE CONTRACT_MASTER
CONTRACT_SEQ NUMBER(10) NOT NULL,
PDN CHAR(5) NOT NULL,
APPID NUMBER(10) NOT NULL,
CONTRACT_LOB_DESC VARCHAR2(20) NOT NULL,
CUSTOMER_NAME VARCHAR2(57) NOT NULL,
CONTRACT_DT DATE NOT NULL,
CONTRACT_RECD_DT DATE NOT NULL,
HELD_OFFERING_DT DATE NOT NULL,
DRAFT_AMT NUMBER(15,2) NOT NULL,
STATUS_DESC VARCHAR2(20) NOT NULL,
GIF_UPLOAD_TM TIMESTAMP NOT NULL
CREATE table CONTRACT_COMMENTS
CONTRACT_COMMENTS_SEQ NUMBER(10) NOT NULL,
APPID NUMBER(10) NOT NULL,
COMMENTS VARCHAR2(1000) NOT NULL,
GIF_UPLOAD_TM TIMESTAMP NOT NULL
Constraints on tables
ALTER TABLE CONTRACT_MASTER ADD
CONSTRAINT XPKCONTRACT_MASTER PRIMARY KEY (CONTRACT_SEQ) USING INDEX ;
ALTER TABLE CONTRACT_COMMENTS ADD
CONSTRAINT XPKCONTRACT_COMMENTS PRIMARY KEY (CONTRACT_COMMENTS_SEQ) USING INDEX ;
alter table CONTRACT_MASTER add CONSTRAINT XUIAPPCONTRACT_MASTER UNIQUE (APPID) USING INDEX;
CREATE INDEX XUIAPPCONTRACT_COMMENTS ON
CONTRACT_COMMENTS(APPID) ;
Materialized View Creation:
CREATE MATERIALIZED VIEW LOG ON CONTRACT_MASTER WITH PRIMARY KEY,ROWID;
CREATE MATERIALIZED VIEW LOG ON CONTRACT_COMMENTS WITH PRIMARY KEY, ROWID;
CREATE MATERIALIZED VIEW MV_CONTRACT_COMMENTS_HELDOFFERING
REFRESH FAST
ENABLE QUERY REWRITE AS
SELECT APPID,COMMENTS FROM CONTRACT_COMMENTS WHERE APPID IN (
SELECT APPID FROM CONTRACT_MASTER WHERE STATUS_DESC = 'Held Offering' )
Errors generated:
ERROR at line 4:
ORA-12015: cannot create a fast refresh materialized view from a complex query
_*Afer That I have changed the query but still it was not created like:*_
CREATE MATERIALIZED VIEW MV_CONT_COMMNTS_HELDOFFERNG
REFRESH FAST
ENABLE QUERY REWRITE AS
SELECT CONTRACT_COMMENTS_SEQ,c.APPID,COMMENTS
FROM CONTRACT_COMMENTS c,CONTRACT_MASTER m
WHERE m.APPID = c.APPID and m.STATUS_DESC = 'Held Offering'
*even though error displayed:
SQL> CREATE MATERIALIZED VIEW MV_CONT_COMMNTS_HELDOFFERNG*
2 REFRESH FAST
3 ENABLE QUERY REWRITE AS
4 SELECT CONTRACT_COMMENTS_SEQ,c.APPID,COMMENTS
5 FROM CONTRACT_COMMENTS c,CONTRACT_MASTER m
6 WHERE m.APPID = c.APPID and m.STATUS_DESC = 'Held Offering';
FROM CONTRACT_COMMENTS c,CONTRACT_MASTER m
ERROR at line 5:
ORA-12052: cannot fast refresh materialized view GSSIO.MV_CONT_COMMNTS_HELDOFFERNG
*Again I have done "Analyzing Materialized Views for Fast Refresh" as follows:*
1: exec dbms_mview.explain_mview('MV_CONT_COMMNTS_HELDOFFERNG');
2: SELECT capability_name, possible, SUBSTR(msgtxt,1,60) AS msgtxt
FROM mv_capabilities_table
WHERE capability_name like '%FAST%';
Output is :
CAPABILITY_NAME P MSGTXT
REFRESH_FAST N
REFRESH_FAST_AFTER_INSERT N the SELECT list does not have the rowids of all the detail t
REFRESH_FAST_AFTER_ONETAB_DML N see the reason why REFRESH_FAST_AFTER_INSERT is disabled
REFRESH_FAST_AFTER_ANY_DML N see the reason why REFRESH_FAST_AFTER_ONETAB_DML is disabled
REFRESH_FAST_PCT N PCT is not possible on any of the detail tables in the mater
Please suggest what to do to implement fast refresh materialized view for same.Edited by: dba on Sep 20, 2010 12:00 AMIf the two MVs have to be consistent with each other as of a specific time, put them into a Refresh Group and refresh them with DBMS_MVIEW.REFRESH
If an MV is dependent on another, use DBMS_MVIEW.REFRESH_DEPENDENT
See the "Oracle® Database PL/SQL Packages and Types Reference" documentation pages for DBMS_MVIEW.
Hemant K Chitale
http://hemantoracledba.blogspot.com --- this is NOT a documentation site.
Edited by: Hemant K Chitale on Sep 20, 2010 5:19 PM -
Problem refreshing Materialized View in SQL Developer
I have a database schema with a Materialized View (MV) that updates a products table shown on a website. This schema was recently imported to an 11g database from 8i, but since this import I have been unable to refresh my schema’s Materialized View.
The MV_PRODUCT_MASTER Materialized View attaches price data to product data that is stored in a normal WEB_PRODUCT table, and create an MV table as a result. The output MV table is what the website pulls data from to display to the site users. Since it is an MV table, this table cannot be edited directly. In order to change, say, a product description, I need to alter the description field in WEB_PRODUCT and manually refresh the MV_PRODUCT_MASTER table. Only through the refresh will the upstream edits appear in the MV_PRODUCT_MASTER table and be visible on the website.
In my old 7.6.0.11 copy of TOAD, I could manually refresh these MVs easily, by opening the “Snapshots” tab, right clicking on the MV I wanted to refresh and selecting the “Refresh” option. Since the schema was imported to 11g, I have been using the Oracle SQLDeveloper tool to manage the schema. SQLDeveloper doesn’t have a clear method for manually refreshing an MV, or else the method I am using isn’t working.
If I right click on the MV_PRODUCT_MASTER Materialized View object, and choose “Other Actions”, I see the following choices:
Shrink Materialized View
Compile Materialized View
Force Materialized View Refresh
Rebuild Materialized View
…I assumed that “Force Materialized View Refresh” was the right choice, and chose that. This option displays the SQL:
alter materialized view "WEBADMIN"."MV_PRODUCT_MASTER" consider fresh
When I apply this, I get the message: “Materialized view “MV_PRODUCT_MASTER” has been set torefreshed”. However, no changes appear in the MV output table. i.e. if I make a specific change to a row in the WEB_PRODUCT table, the change is not being carried into the MV_PRODUCT_MASTER table, so that indicated that the refresh is not actually happening. The MV table appears to believe it is being refreshed:
REWRITE_CAPABILITY GENERAL
REFRESH_MODE DEMAND
REFRESH_METHOD COMPLETE
BUILD_MODE IMMEDIATE
FAST_REFRESHABLE NO
LAST_REFRESH_TYPE COMPLETE
LAST_REFRESH_DATE 06-APR-10
STALENESS UNKNOWN
…but it isn’t showing any changes.
What am I doing wrong? Is there a plain SQL statement I can run in order to run these refreshes, instead of using the SQLDeveloper GUI? Thanks for any advice on this.Hi Blama,
DDL for Index-organized Materialized Views is generated in the Early Adopter release 4.1.0.866, which is now available for download.
The Organization on the Table that is implemented as the Materialized View should be set to INDEX, and the Table's IOT properties will be used during DDL generation.
David -
Need Help in Mat View Creation
I have the following query to create a mat view
CREATE MATERIALIZED VIEW IB_CONT1
REFRESH FAST ON DEMAND WITH ROWID
AS
SELECT
CUST,
CONSEQ,
STD,
ENDD,
ADD
FROM
ADMIN.CONTACT@IB_DBLINK;But it displays an error as
ADMIN.CONTACT@IB_DBLINK
ERROR at line 11:
ORA-12018: following error encountered during code generation for
"OWNER"."IB_CONT1"
ORA-00942: table or view does not existBut when i query the table i displays data.
SQL> select count(*) from admin.contact@ib_dblink;
COUNT(*)
100what could be the reason?
Any help will be highly appreciated.
Thanks in advance.Try without ROWID option.
Regards
RK -
MAT View Creation Performance Issue
Hello Experts,
Below query is executing approximately in 1-3 sec.
select
COMMITMENT_ID,
FUNDING_RULE_ID,
reporting_year||'-'||reporting_period as RepPeriod,
GET_START_DAY_OF_PERIOD (FUNDING_RULE_ID, reporting_year, reporting_period) START_DAY_OF_PERIODt,
GET_END_DAY_OF_PERIOD(FUNDING_RULE_ID, reporting_year, reporting_period) END_DAY_OF_PERIOD
from
(select
COMMITMENT_ID,
FR_ID as FUNDING_RULE_ID,
COMT_START_DATE,
--COMT_TERMINATION_DATE,
GETREPYEARFROMDATE(COMT_START_DATE,FR_ID) as reporting_year,
GETREPORTINGPERIOD(to_char(COMT_START_DATE, 'mm') ,FR_ID) as reporting_period
from
select
COMMITMENT_ID,
COMT_START_DATE,
--COMT_TERMINATION_DATE,
COALESCE(CB_FUNDING_RULE_ID,NC_FUNDING_RULE_ID) FR_ID
from
(COMMITMENT_TABLE left outer join (CHILD_BENEFICIARY_TABLE left outer join FUNDING_RULE_TABLE a on
a.FUNDING_RULE_ID = CB_FUNDING_RULE_ID )
on COMT_BENEFICIARY_REF = CB_BENEFICIARY_REF
left outer join (NON_CHILD_BENEFICIARY_TABLE left outer join FUNDING_RULE_TABLE b on
b.FUNDING_RULE_ID = NC_FUNDING_RULE_ID)
on
COMT_BENEFICIARY_REF = NC_BENEFICIARY_REF)
The query is returning 4.5 lacks of rows.
I want to create a MAT view by using above query and refresh this on daily basis.
But the MAT view creation is taking more time near about 401sec (6.68min).
Why the MAT view is taking more time?
MAT_VIEW
CREATE MATERIALIZED VIEW "REP_PERIOD_START_END_DATE"
AS select
COMMITMENT_ID,
FUNDING_RULE_ID,
reporting_year||'-'||reporting_period as RepPeriod,
GET_START_DAY_OF_PERIOD (FUNDING_RULE_ID, reporting_year, reporting_period) START_DAY_OF_PERIODt,
GET_END_DAY_OF_PERIOD(FUNDING_RULE_ID, reporting_year, reporting_period) END_DAY_OF_PERIOD
from
(select
COMMITMENT_ID,
FR_ID as FUNDING_RULE_ID,
COMT_START_DATE,
--COMT_TERMINATION_DATE,
GETREPYEARFROMDATE(COMT_START_DATE,FR_ID) as reporting_year,
GETREPORTINGPERIOD(to_char(COMT_START_DATE, 'mm') ,FR_ID) as reporting_period
from
select
COMMITMENT_ID,
COMT_START_DATE,
--COMT_TERMINATION_DATE,
COALESCE(CB_FUNDING_RULE_ID,NC_FUNDING_RULE_ID) FR_ID
from
(COMMITMENT_TABLE left outer join (CHILD_BENEFICIARY_TABLE left outer join FUNDING_RULE_TABLE a on
a.FUNDING_RULE_ID = CB_FUNDING_RULE_ID )
on COMT_BENEFICIARY_REF = CB_BENEFICIARY_REF
left outer join (NON_CHILD_BENEFICIARY_TABLE left outer join FUNDING_RULE_TABLE b on
b.FUNDING_RULE_ID = NC_FUNDING_RULE_ID)
on
COMT_BENEFICIARY_REF = NC_BENEFICIARY_REF)
Is there any way to make the MAT view creation within 3 minutes?CREATE MATERIALIZED VIEW "REP_PERIOD_START_END_DATE"
AS
with tab as
select /*+ materialize */ commitment_id,
comt_start_date,
--COMT_TERMINATION_DATE,
coalesce (cb_funding_rule_id, nc_funding_rule_id)
fr_id
from ( commitment_table
left outer join
( child_beneficiary_table
left outer join
funding_rule_table a
on a.funding_rule_id = cb_funding_rule_id)
on comt_beneficiary_ref = cb_beneficiary_ref
left outer join
( non_child_beneficiary_table
left outer join
funding_rule_table b
on b.funding_rule_id = nc_funding_rule_id)
on comt_beneficiary_ref = nc_beneficiary_ref)
select commitment_id,
funding_rule_id,
reporting_year || '-' || reporting_period as repperiod,
get_start_day_of_period (funding_rule_id,
reporting_year,
reporting_period)
start_day_of_periodt,
get_end_day_of_period (funding_rule_id,
reporting_year,
reporting_period)
end_day_of_period
from (select commitment_id,
fr_id as funding_rule_id,
comt_start_date,
--COMT_TERMINATION_DATE,
getrepyearfromdate (comt_start_date, fr_id) as reporting_year,
getreportingperiod (to_char (comt_start_date, 'mm'), fr_id)
as reporting_period
from tab); -
Stop and refresh buttons (one will disappear while the other is active). I have found numerous websites that just don't want to load on the first try, now I am unable to refresh it (usually in a new tab) because the button disappears. BTW 255 limit is BS.
You can try to press the ESC key to stop loading the page if you see the Stop button instead of the Reload button. You can also reload the page via F5 or Ctrl + F5 (cache bypass).
Firefox 4.0 has a combined Reload and Stop and Go button that appears at the right end of the location bar.
To restore the Firefox 3 appearance you can use these steps:
* Open the "View > Toolbars > Customize" window to move the Stop and Reload button out of the location bar.
* Move the Reload and Stop buttons to their previous position at the left side of the location bar.
* Set the order to "Reload - Stop" to get a combined "Reload/Stop" button.
* Set the order to "Stop - Reload" or separate them otherwise to get two distinct buttons. -
Alternative for OUTER Join for use in fast refresh materialized view
Hi ,
I have two tables as :
CREATE TABLE TEST_SANDY1
COL1 NUMBER
CREATE TABLE TEST_SANDY2
COL1 NUMBER,
COL2 VARCHAR2(10 BYTE)
Data for the tables are :
INSERT INTO TEST_SANDY1 ( COL1 ) VALUES (
1);
INSERT INTO TEST_SANDY1 ( COL1 ) VALUES (
2);
INSERT INTO TEST_SANDY1 ( COL1 ) VALUES (
3);
COMMIT;
INSERT INTO TEST_SANDY2 ( COL1, COL2 ) VALUES (
1, 'a');
INSERT INTO TEST_SANDY2 ( COL1, COL2 ) VALUES (
2, 'b');
INSERT INTO TEST_SANDY2 ( COL1, COL2 ) VALUES (
4, 'd');
COMMIT;
Now when I run the following select statement :
select
b.col1
from
test_sandy1 a,
test_sandy2 b
where
b.COL1 = a.COL1(+)
I get :
COL1
1
2
4
I want to build a materialized view to generate the same values but it has to be fast refresh. But since I am using outer join I am unable to create a fast refresh one.
Can someone suggest an alternate select to create fast refresh materialized view.
Thanks,
SandipanThe select statement was not fitting my problem , so I'll change it as :
select
a.col1, nvl(b.col2, 'DEFAULT')
from
test_sandy1 a,
test_sandy2 b
where
b.COL1(+) = a.COL1
I get :
COL1 VAL
1 a
2 b
3 DEFAULT
How do I this ? -
I have an e trade site and I get a error message on my main page. "unable to refresh chart"
My site is written below and. Error message says
"unable to refresh chart"
http://www.ngkbujimarket.com/index.php
I need your helps
ThanksMake sure that you do not block cookies from that website.
* https://support.mozilla.com/kb/Cookies
* https://support.mozilla.com/kb/Enabling+and+disabling+cookies
Clear the cache and the cookies from sites that cause problems.
"Clear the Cache":
* Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
"Remove Cookies" from sites causing problems:
* Tools > Options > Privacy > Cookies: "Show Cookies" -
Reg:package code to refresh materialized views
i am new to pl/sql packages and procedures.i want it to execute for running mappings in informatica which takes 0 and gives 1 when executed successfully
create or replace PACKAGE BODY pkg_refresh_mv as
procedure prc_mv (p_mv_name varchar2) is
begin
dbms_mview.refresh (p_mv_name);
end prc_mv;
procedure refresh_all_mv (proc_response IN OUT number) is
begin
dbms_mview.refresh('materialized view','C');
dbms_mview.refresh('materialized view','C');
proc_response := 1;
exception
when others then
proc_response := 0;
end refresh_all_mv ;
end pkg_refresh_mv;
when i execute this code i get the following errors
PLS-00201: identifier 'PKG_REFRESH_MV' must be declared
PLS-00304: cannot compile body of 'PKG_REFRESH_MV' without its specification
what needs to be changed
thankstry this one :
CREATE OR REPLACE PACKAGE pkg_refresh_mv
AS
PROCEDURE prc_mv (p_mv_name VARCHAR2);
PROCEDURE refresh_all_mv (proc_response IN OUT NUMBER);
END pkg_refresh_mv;
CREATE OR REPLACE PACKAGE BODY pkg_refresh_mv
AS
PROCEDURE prc_mv (p_mv_name VARCHAR2)
IS
BEGIN
dbms_mview.refresh (p_mv_name);
END prc_mv;
PROCEDURE refresh_all_mv (proc_response IN OUT NUMBER)
IS
BEGIN
dbms_mview.refresh ('materialized view', 'C');
dbms_mview.refresh ('materialized view', 'C');
proc_response := 1;
EXCEPTION
WHEN OTHERS
THEN
proc_response := 0;
END refresh_all_mv;
END pkg_refresh_mv;
/ -
How to Refresh materialized view
Hi,
I am using 11G owb. I would like to know if any one can help me know if there is any easy to Refresh materialized view . I will be using this materialized view to source data from my maps. this map will be part of a process flow. i would like to refresh the materialized view before every run of the map in process flow.
Thanks,
Ash.
Edited by: user591315 on Aug 6, 2009 1:26 PMA couple of approaches;
* refresh the MV from a procedure in a pre map process operator (its an operator in a mapping), or
* call the procedure from a process flow activity before the map
Cheers
David -
Refresh Materialized View in a package
Refresh Materialized View in a process.
I have a USER2.Materialized view and when I want to refresh it I execute:
execute dbms_mview.refresh('MV_FACT_SALES','C');
But I have the ETL process in a USER1.package
The User1 needs any Materialized View Grant or any privilegie?
How can I refresh the Materialized View in a procedure in the USER1.package?I 'm sorry, but I want to create a procedure under USER2 and when I execute the script to create it I receive the error:
ORA-06550: line 4, column 12:
PLS-00103: Encountered the symbol "DBMS_MVIEW" when expecting one of the following:
:= . ( @ % ; immediate
The symbol ":=" was substituted for "DBMS_MVIEW" to continue.
Te script procedure is:
PROCEDURE REFRESH_MV IS
BEGIN
execute dbms_mview.refresh('MV_FACT_SALES','C');
END;
How can I refresh a Materialized view in a procedure?
Thanks!
Maybe you are looking for
-
Handshaking problem while invoking a secured web service
Hi, I have developed a web service. I made my WLS 7.0 secured, using SSL. Also I made the my web service accessible only by https protocol. Also I configured the WLS SSL to have one way SSL. The problem is I am not able to access this web service usi
-
I just recently got the ipad2, but before I had a chance to sync it to itunes, my pc died. I'm pretty new to all of this, so I don't know if there's any way to get access to my itunes library. There is a ton of songs there, most of which I exported f
-
How can I reinstall Mountain Lion?
I've been encountering random bugs every now and then and I'm planning to reinstall it again.
-
Making Photo Montage for Desktop
Hi Guys, I have a ton of really small photographs in a folder on my desktop that I would like to have in one large picture. I am looking to create something that has all the photos (or at least most) on a grid in one large picture and then set that a
-
"You must restart your system" error when installing Tiger on a new drive
While trying to install Mac OS 10.4 from the install DVD the install stops during the "Basic Install ..." phase and I get a gray screen that says "You must restart the system by pressing the power button ....." shown four different languages. I resta