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

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Working with Database Objects » Working with views » Working with materialized views

Creating materialized views Next Page

Initializing materialized views


An uninitialized material view has no data, and exists as a definition in the database. A materialized view is in an uninitialized state just after creation, or just after being re-enabled. A failed refresh attempt can also return the materialized view to an uninitialized state. You must initialize a materialized view to make it available for use by the database server.

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

To initialize a materialized view (Sybase Central)
  1. Connect to the database as the DBA, or with INSERT permission on the materialized view.

  2. Open the Views folder.

  3. Select the materialized view and choose File > Refresh Data.

To initialize a materialized view (SQL)
  1. Connect to the database as the DBA, or with INSERT permission on the materialized view.

  2. Execute a REFRESH MATERIALIZED VIEW statement.

  3. Example

    In this example, the EmployeeConfidential materialized view is initialized:

    REFRESH MATERIALIZED VIEW EmployeeConfidential;
    Note

    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.

    See also