3.1 Enabling GeoRaster at the Schema Level

GeoRaster must be enabled for each database schema that will use the GeoRaster feature.

By default, the GeoRaster feature is disabled after the Oracle Spatial is initially installed. GeoRaster can be enabled only within the scope of a schema (that is, not for the entire database), and it must be enabled for each schema that will use the GeoRaster feature.

To enable GeoRaster, follow these steps for each schema for which GeoRaster will be enabled:

  1. Ensure that the user for this schema has the CREATE TRIGGER privilege (which is required for GeoRaster to work properly). If the user does not have the CREATE TRIGGER privilege (or if you do not know), connect as a user with DBA privilege and execute the following code:
    GRANT CREATE TRIGGER TO scott;
  2. Connect to the database as the user for that schema. For example:
    CONNECT scott/<password-for-scott>
  3. Enter the following statement:
    EXECUTE SDO_GEOR_ADMIN.enableGeoRaster;
  4. Verify that GeoRaster is now enabled by checking that the following statement returns TRUE:
    SELECT SDO_GEOR_ADMIN.isGeoRasterEnabled FROM DUAL;

For each database schema, SDO_GEOR_ADMIN.enableGeoRaster only needs to be called once. In any case, you can call SDO_GEOR_ADMIN.isGeoRasterEnabled function to check if GeoRaster feature is enabled. You can use SDO_GEOS_ADMIN.disableGeoRaster procedure to disable GeoRaster feature for the database schema.

If a GeoRaster table has been created and populated with data, then after a database upgrade, GeoRaster is automatically enabled for that table’s schema, and you do not need to re-enable GeoRaster for the schema. (Just ensure that the CREATE TRIGGER privilege is granted to the user.)