Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Tables, views, and indexes » Materialized views

 

Initializing a materialized view

Initialize a materialized view to populate it with data and make it available for use by the database server. To initialize a materialized view, you follow the same steps as refreshing a materialized view.

Prerequisites

You must be the owner of the materialized view, have INSERT privilege on the materialized view, or have the INSERT ANY TABLE privilege.

Before creating, initializing, or refreshing materialized views, ensure that all materialized view restrictions have been met.

Context and remarks

You can initialize all uninitialized materialized views in the database at once using the sa_refresh_materialized_views system procedure.

 Task
  1. In Sybase Central, use the SQL Anywhere 16 plug-in to connect to the database.

  2. In the left pane, double-click Views.

  3. Right-click a materialized view and click Refresh Data.

  4. Select an isolation level and click OK.

Results

The materialized view is populated with data and becomes available for use by the database server. You can now query the materialized view.

Next

Query the materialized view to ensure that it returns the expected data.

A failed initialization (refresh) attempt returns the materialized view to an uninitialized state. If initialization fails, review the definition for the materialized view to confirm that the underlying tables and columns specified are valid and available objects in your database.

 See also