Create Filter

Create or re-create a database security filter, either from scratch or as a copy of another filter on the same system. Filters control security for database objects. Use grant to assign filters to users and groups.

Minimum permission required: Database Manager.

Syntax

Syntax diagram for create filter.FILTER-NAMEMEMBER-EXPRESSION

Use create filter to create a filter in the following ways:

KeywordDescription

create filter

Create a security filter to restrict or permit access to specified database cells.

create or replace filter

Create a security filter or replace an existing security filter of the same name.

create filter ... no_access on <member-expression>

Create a filter blocking access to a specified member combination.

create filter ... read on <member-expression>

Create a filter providing read-only access to a specified member combination.

create filter ... write on <member-expression>

Create a filter providing write access to a specified member combination.

create filter ... meta_read on <member-expression>

Create a filter restricting access to siblings and ancestors of the member expression. In case of a filtering conflict, the MetaRead filtering overrides the other filter permissions. For more information about metatdata filtering, see Metadata Filtering.

create or replace filter ... definition_only;

Updates the filter definition while retaining user associations with the filter. If you replace a filter without using definition_only, then the filter must be re-granted to any users to whom it was assigned.

Notes

Example

create filter sample.basic.filt1 read on 'Jan, sales', no_access on '@CHILDREN(Qtr2)';

Creates a filter to restrict privileges to Sample Basic as follows: gives read-only access to the intersection of Jan and sales (sales data for January only); blocks access to children of Qtr2 (April, May, and June).

create or replace filter sample.basic.filt1 read on 'Sales, @ATTRIBUTE(Bottle)';

Creates a filter (or changes an existing filter) to restrict privileges to Sample Basic as follows: gives read-only access to sales data for products packaged in a bottle (product base dimension members associated with the Bottle attribute member).