Oracle Materialized View Manual Refresh
Following is the call that can be made to refresh your materialized view in Oracle manually:
1 | execute DBMS_SNAPSHOT.REFRESH('[MV_NAME]','[refresh_option]'); |
Refresh Options:
- ? - Uses default
- F or f - Fast
- C or c - Complete
- A - Always complete
Related Information:
- Oracle Materialized View DDL
Are you a TOAD fanatic when it comes to “anything-Oracle”? If so, you probably realized that TOAD will not show...
- Oracle BPA -> BPEL Manual Configuration Items
Oracle BPA does a great job importing into BPEL, but here are a few items that need to be manually...
- Oracle IdM - SAML SSO with Google Apps
We recently integrated Oracle IdM with the SAML SSO Service from Google Apps. Now customers can continue to authenticate against...
- Google Apps Reporting API - Not quite this easy with Exchange
I have been somewhat enamored by Google Apps and its potential. Many enterprises have been happy with Exchange for mail,...
- Google Custom Search Engine (CSE)
The site search game is changing with Google CSE....
- Is your city doing enough? Taking Branding, Marketing, Promotion, Contest Strategy To New Levels
We all heard about Topeka’s unprecedented name change to Google. But ironically, to me, Google’s logo change to Topeka today...

Dec 09, 2009
Dear all,
This is Code For Refresh Materialized in .NET
Public Sub RefreshMView()
Dim tran As OracleTransaction
Dim Con As String = “Data Source=” & ServerName & “;User ID=” & UserName & “;Password=” & Pwd & “;Unicode=True”
Dim Conn As New OracleConnection(Con)
Try
Conn.Open()
tran = Conn.BeginTransaction
Dim cmd As New OracleCommand()
cmd.Connection = Conn
cmd.Transaction = tran
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = “refresh_P_V_PO_QTY”
cmd.ExecuteNonQuery()
tran.Commit()
Conn.Close()
cmd = Nothing
Catch ex As Exception
tran.Rollback()
Finally
Conn.Close()
End Try
End Sub
//Procedure in ORACLE For Refresh Materialized View in VB.NET
CREATE PROCEDURE refresh_P_V_PO_QTY
IS
v_error_code NUMBER;
v_error_message VARCHAR2 (400);
v_date DATE;
BEGIN
/*Materialized 1*/
dbms_mview.refresh(’V_SCH_QTY’,'C’);
COMMIT;
/*Materialized 2*/
dbms_mview.refresh(’V_DISP_QTY’,'C’);
COMMIT;
/*Materialized 3*/
dbms_mview.refresh(’V_PO_QTY’,'C’);
COMMIT;
/*Materialized 4*/
dbms_mview.refresh(’V_PO_DETAIL’,'C’);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
v_error_code := SQLCODE;
v_error_message := SUBSTR (SQLERRM, 1, 100);
DBMS_OUTPUT.put_line ( ‘mv_opbyiss_temp_or:-’
|| ‘ Date:’
|| v_date
|| ‘ ‘
|| v_error_code
|| ‘ ‘
|| v_error_message
);
END;