You must initialize a materialized view to make it available for use by the database server. To initialize it, you refresh it. A failed refresh attempt returns the materialized view to an uninitialized state.
Before creating, initializing, or refreshing materialized views, ensure that all materialized view restrictions have been met. See Restrictions on materialized views.
You can also initialize all uninitialized materialized views at once using the sa_refresh_materialized_views system procedure. See sa_refresh_materialized_views system procedure.
Use the SQL Anywhere 12 plug-in to connect to the database as a user with DBA authority or as a user with INSERT permission on the materialized view.
In the left pane, double-click Views.
Right-click a materialized view and choose Refresh Data.
Select an isolation level and click OK.
When you are done with this example, you should drop the materialized view you created. Otherwise, you will not be able to make schema changes to its underlying tables Employees and Departments, when trying out other examples. You cannot alter the schema of a table that has enabled, dependent materialized view. See Drop materialized views.
Connect to the database as a user with DBA authority, or as a user with INSERT permission on the materialized view.
Execute a REFRESH MATERIALIZED VIEW statement.
Discuss this page in DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|