5.1.2 Creating a Cross-Schema Index

You can create a spatial index on a table that is not in your schema. Assume that user B wants to create a spatial index on column GEOMETRY in table T1 under user A's schema. Follow these steps:

  1. Connect to the database as a privileged user (for example, as SYSTEM), and execute the following statement:
    GRANT create table, create sequence to B;
    
  2. Connect as a privileged user or as user A (or have user A connect), and execute the following statement:
    GRANT select, index on A.T1 to B;
    
  3. Connect as user B and execute a statement such as the following:
    CREATE INDEX t1_spatial_idx on A.T1(geometry)
      INDEXTYPE IS mdsys.spatial_index;