The Artima Developer Community
Sponsored Link

Java Answers Forum
Using Java to Refresh a Materialized view

1 reply on 1 page. Most recent reply: Mar 17, 2005 5:42 AM by ste

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Ravi

Posts: 1
Nickname: batcha
Registered: Dec, 2004

Using Java to Refresh a Materialized view Posted: Dec 4, 2004 10:10 PM
Reply to this message Reply
Advertisement
Hi all!
This is my first question:
How can i refresh a Materialized View in Oracle9i using java?


ste

Posts: 1
Nickname: gatling77
Registered: Mar, 2005

Re: Using Java to Refresh a Materialized view Posted: Mar 17, 2005 5:42 AM
Reply to this message Reply
try the following code in your java application:

Connection connection = ...

String refresh = "{call DBMS_snapshot.refresh('<name of your materialized view>')}";

CallableStatement statement = connection.prepareCall(refresh);
statement.execute();


your MUST creat the view using the option

REFRESH ON DEMAND

see also,
http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96567/repmview.htm
for more info about materilized views.
S

Flat View: This topic has 1 reply on 1 page
Topic: Initializing a class and naming it the contents of a String Previous Topic   Next Topic Topic: Problem with applet repaint

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use