When you create a materialized view its refresh type is manual. However, you can change it to immediate. To change from manual to immediate, the view must be in an uninitialized state (contain no data). If the view was just created and has not yet been refreshed, it is uninitialized. If it has data in it, you must truncate the data. The view must also have a unique index, and must conform to the restrictions required for an immediate view. See Additional restrictions for immediate views.
An immediate view can be converted to manual at any time by simply changing its refresh type.
The following procedures explain how to change a manual view to an immediate view. Before performing one of these procedures, verify the manual view has a unique index and is uninitialized. Then, optionally, check its eligibility for immediate refresh type using the sa_materialized_view_can_be_immediate system procedure. See sa_materialized_view_can_be_immediate system procedure.
Use the SQL Anywhere 12 plug-in to connect to the database as a user with DBA authority or as the owner of the view and all of the tables it references.
In the left pane, double-click Views.
Right-click the materialized view and choose Properties.
In the Refresh Type field, choose Immediate.
Click OK.
Connect to the database as a user with DBA authority, or as owner of the view and all the tables it references.
Change the refresh type to immediate by executing an ALTER MATERIALIZED VIEW ... IMMEDIATE REFRESH statement.
The following procedures explain how to change an immediate view to a manual view.
Use the SQL Anywhere 12 plug-in to connect to the database as a user with DBA authority or as the owner of the view.
In the left pane, double-click Views.
Right-click a materialized view and choose Properties.
In the Refresh Type field, choose Manual.
Click OK.
Connect to the database as the owner of the view, or as a user with DBA authority.
Change the refresh type to manual by executing an ALTER MATERIALIZED VIEW ... MANUAL REFRESH statement.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |