3.14 Checking GeoRaster Tables and Objects in the Database

For database management purposes, you might need check on GeoRaster tables and objects in the whole database or under a specific schema. After the GeoRaster database is created, you have the following options for checking or listing existing GeoRaster tables, RDT tables, and GeoRaster objects.

  • Use the following subprograms check the status of existing GeoRaster objects and related objects in the current schema or the database, depending on the privileges associated with the database connection.

    SDO_GEOR_ADMIN.listGeoRasterObjects lists all GeoRaster objects defined in the current schema; or if you call this function as a user with DBA role, all GeoRaster objects defined in the database are listed.

    SDO_GEOR_ADMIN.listGeoRasterColumns lists all GeoRaster columns defined in the current schema; or if you call this function as a user with DBA role, all GeoRaster columns defined in the database are listed.

    SDO_GEOR_ADMIN.listGeoRasterTables lists all GeoRaster tables defined in the current schema; or if you call this function as a user with DBA role, all GeoRaster tables defined in the database are listed.

    SDO_GEOR_ADMIN.listRDT lists all  raster data tables (RDTs) defined in the current schema; or if you call this function as a user with DBA role, all raster data tables (RDTs) defined in the database are listed.

    SDO_GEOR_ADMIN.listRegisteredRDT lists all registered raster data tables (RDTs) defined in the current schema; or if you call this function as a user with DBA role, all registered RDTs defined in the database are listed . An RDT is registered if at least one entry in the SYSDATA table refers to it.

    SDO_GEOR_ADMIN.listUnregisteredRDT lists all unregistered raster data tables (RDTs) defined in the current schema; or if you call this function as a user with DBA role, all unregistered RDTs defined in the database are listed.. An RDT is unregistered if no entry in the SYSDATA table refers to it.

  • Run SQL queries directly against GeoRaster sysdata views, and check or list GeoRaster tables and objects stored in the different schemas. This approach is more flexible than calling subprograms. It also enables some query results that cannot be returned by functions defined in the SDO_GEOR_ADMIN package. The following are some sample queries.

    List all GeoRaster objects that are defined in the schema HERMAN and MYTEST and accessible by the current schema.

    SELECT owner,TABLE_NAME,COLUMN_NAME,RDT_TABLE_NAME,RASTER_ID from all_sdo_geor_sysdata where owner='HERMAN' or owner='MYTEST';

    Count the total number of GeoRaster objects accessible by the current schema.

    SELECT count(*) from all_sdo_geor_sysdata;

    Count the total number of GeoRaster objects stored in the GeoRaster table GTF_TABLE in the current schema.

    SELECT count(*) from user_sdo_geor_sysdata where TABLE_NAME='GTF_TABLE';

    List all GeoRaster objects stored in the RDT table RDT_1 in the current schema.

    SELECT TABLE_NAME,COLUMN_NAME,RDT_TABLE_NAME,RASTER_ID from user_sdo_geor_sysdata where RDT_TABLE_NAME='RDT_1';

    Find out all GeoRaster tables that store some raster data in or reference the RDT table RDT_1 in the current schema.

    SELECT distinct TABLE_NAME from user_sdo_geor_sysdata where RDT_TABLE_NAME='RDT_1';

    List all RDT tables that are used by the GeoRaster table GTF_TABLE in the current schema.

    SELECT distinct RDT_TABLE_NAME from user_sdo_geor_sysdata where TABLE_NAME='GTF_TABLE';