SDO_UTIL.GRANT_VECTORTILE_CACHE

Format

SDO_UTIL.GRANT_VECTORTILE_CACHE(
  schema_name     IN VARCHAR2,
  read_only       IN BOOLEAN DEFAULT FALSE
);

Description

Grants read or write priviliges on vector tile caches to another schema.

Parameters

schema_name

Name of the schema being granted access to a vector tile cache.

read_only

Controls the vector tile cache privileges.

Supported values are:

Usage Notes

Although SDO_UTIL.GRANT_VECTORTILE_CACHE allows another schema to read and insert tiles, only the owning schema is allowed to enable, disable, or purge a vector tile cache.

Examples

The following example calls SDO_UTIL.GRANT_VECTORTILE_CACHE to grant user_b read and write privileges on the vector tile cache owned by user_a. As a prerequisite, to allow user_b to build vector tiles on user_a.counties table, READ privilege is granted on the counties table to user_b.

-- Grant user_b read access to the source table
GRANT READ on counties TO user_b;

-- Grant user_b full access to the cache
SDO_UTIL.GRANT_VECTORTILE_CACHE('user_b');

–– user_b can then access:
SELECT SDO_UTIL.GET_VECTORTILE(TABLE_NAME=>'USER_A.COUNTIES',
                               GEOM_COL_NAME=>'GEOM',
                               TILE_ZOOM=>8, TILE_X=>73, TILE_Y=>97,
                               ATT_COL_NAMES=>sdo_string_array('COUNTY','LANDSQMI'))
FROM dual;

Also note that there may be multiple vector tile caches in the user_a schema. But since user_b is granted READ privilege only on the COUNTIES table, those are the only tiles user_b will be able to read from the cache.