ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Install ST_Raster in Oracle

Available with Standard or Advanced license.

  • Update the extproc file
  • Install ST_Raster
  • Confirm installation
  • Alter geodatabase configuration

ST_Raster is a data type that allows you to store raster data directly in a geodatabase table. You would use the ST_Raster type if you need to access your geodatabase raster data using SQL.

Use the Create Raster Type geoprocessing tool, or a Python script that calls the tool, to install the ST_Raster type in a geodatabase.

Note:

The ST_Raster type requires the Microsoft Visual C++ 2013 Redistributable Package (x64) when deployed on a Windows server. If the Microsoft Visual C++ 2013 Redistributable Package (x64) is not present on the Oracle server, download it from the Microsoft site and install it.

Once the type is installed, you must change the geodatabase configuration settings so new rasters created in the geodatabase will use the ST_Raster data type.

Update the extproc file

The Oracle external procedure agent (extproc) must access the ST_Raster library (libst_raster_ora).

If ArcMap or ArcGIS Server is installed on the Oracle server, you can update the extproc.ora file to point to the libst_raster_ora in <ArcGIS client installation directory>\DatabaseSupport\Oracle\<Operating System>. Be sure to set the file to the correct library for your Oracle server's operating system. Once exptroc.ora is updated, proceed to installing ST_Raster.

If there is no ArcGIS client installed on the Oracle server, you must first copy the libst_raster_ora library to the Oracle server, update the extproc.ora file, and create the library.

Follow these steps if ArcMap or ArcGIS Server is not installed on the Oracle server:

  1. Create a directory on the Oracle server that your Oracle instance can access.
  2. Download libraries from My Esri or copy the libst_raster_ora library from <ArcMap or ArcGIS Server installation directory>\DatabaseSupport\Oracle\<Operating System>.
  3. Place the libst_raster_ora library appropriate for the Oracle server's operating system in the directory you created.
  4. Update the extproc.ora file to include the path to the libst_raster_ora library.
  5. Using SQL, connect to the Oracle database as the sde user and create the Oracle libst_raster_ora library.

    CREATE LIBRARY LIBST_RASTER
     AS '<absolute path to libst_raster_ora library>'
    /
    

Now that the Oracle server is configured, you can install ST_Raster.

Install ST_Raster

You can either run the Create Raster Type tool from ArcGIS Desktop (Standard or Advanced), or run a Python script from an ArcGIS Server or ArcGIS Desktop (Standard or Advanced) client to install the ST_Raster type.

Run the Create Raster Type tool

If you have access to ArcGIS Desktop (Standard or Advanced), you can run the Create Raster Type tool to install the ST_Raster type.

  1. Start an ArcGIS Desktop client.
  2. Connect to the geodatabase as the sde user.
  3. Open the Create Raster Type tool.

    This tool is in the Geodatabase Administration toolset of the Data Management toolbox.

  4. Specify the database connection you created in step 2 as the Input Database Connection.
  5. Click OK (ArcMap) or Run (ArcGIS Pro).

Use Python

You can run a Python script to create a database connection (.sde) file that connects to the geodatabase as the geodatabase administrator and install the ST_Raster type in the geodatabase.

  1. Open a command window, import the ArcPy module, and use the CreateDatabaseConnection_management function to create a database connection (.sde) file that connects to the geodatabase as the geodatabase administrator. If you connect using database authentication, be sure to save the user name and password with the connection file.

    In this example, a connection file (adminconnect.sde) is created in C:\temp. The connection is made to the teamdata/orcl Oracle instance as the sde user.

    import arcpy
    arcpy.CreateDatabaseConnection_management (r'c:/temp',"adminconnect.sde", "ORACLE", "teamdata/orcl", "DATABASE_AUTH", "sde", "Cky00r", "SAVE_USERNAME")
    

  2. Install the ST_Raster type.

    Here, the adminconnect.sde file is used by the CreateRasterType_management function to connect to the geodatabase and install the ST_Raster type:

    arcpy.CreateRasterType_management (r'c:/temp/adminconnect.sde')
    

Confirm installation

Using an SQL client, connect as any user that has access to the Oracle database where you installed ST_Raster, and test the installation of the ST_Raster type by executing the following SELECT statement:

SELECT sde.st_raster_util.describe() 
 FROM dual;

Successful results for this query include No data found, if no raster data exists in the geodatabase yet, or a list of the raster columns in the database.

An error message is returned if the Oracle listener is not started or the libst_raster_ora library is not accessible. The library may not be accessible if ST_Raster was not installed, the extproc.ora file was not updated with the path to the libst_raster_ora library, or the libst_raster_ora library was copied to the wrong location.

In this example, the describe utility is run to list existing ST_Raster and binary raster columns in the database. In this case, this is a new geodatabase and there are no raster columns yet in the database. Since no error message is returned, you know the installation was successful.

SELECT sde.st_raster_util.describe() 
 FROM dual;

SDE.ST_RASTER_UTIL.DESCRIBE()

No data found.

In this example, the describe utility is also run. However, in this case, the path to the libst_raster_ora library was not added to the extproc.ora ENV parameter. Correct the problem and run the query again to be sure it is fixed.

SELECT sde.st_raster_util.describe() 
 FROM dual;

ERROR:
ORA-28575: unable to open RPC connection to external procedure agent
ORA-06512: at "SDE.ST_RASTER_UTIL", line 190
ORA-06512: at "SDE_ST_RASTER_UTIL", line 377

Now that you have confirmed that ST_Raster is installed, alter configuration keyword settings.

Alter geodatabase configuration

After the ST_Raster is installed in the geodatabase, you must alter the geodatabase configuration to make ST_Raster available for people to use when they create raster datasets and raster catalogs. You can either connect from ArcGIS Desktop (Standard or Advanced) and run geoprocessing tools to accomplish this, or you can use a Python script run from an ArcGIS Server or ArcGIS Desktop (Standard or Advanced) client.

Run geoprocessing tools

If you have access to ArcGIS Desktop, you can use the Export Geodatabase Configuration Keyword tool to export the geodatabase's current configuration settings to a text file, set the RASTER_STORAGE parameter to ST_Raster in the text file, and import the changed text file using the Import Geodatabase Configuration Keyword tool.

  1. Open the Export Geodatabase Configuration Keyword tool in ArcGIS Desktop.
  2. Use the database connection you created for installing ST_Raster as the Input Database Connection.
  3. Specify a location and file name for the text file to be created.
  4. Open the text file in a text editor and set RASTER_STORAGE to ST_Raster.
    • If you want all raster datasets and raster catalogs to use the ST_Raster type without people having to specify a keyword, alter the RASTER_STORAGE parameter under the DEFAULTS keyword.
    • If only some of the raster datasets and raster catalogs should use the ST_Raster type, create a custom keyword and set the RASTER_STORAGE parameter for that keyword to ST_Raster.
  5. Save and close the text file.
  6. Import the altered text file to the geodatabase using the Import Geodatabase Configuration Keyword tool.

Use Python

You use the ArcPy function ExportGeodatabsaeConfigurationKeyword_management to export the current geodatabase configuration settings to a text file, edit and save the text file, then use the ImportGeodatabaseConfigurationKeyword_management function to import changes to the geodatabase.

Use the database connection file you created when you installed ST_Raster for the input_database when you run both the ExportGeodatabsaeConfigurationKeyword_management and ImportGeodatabaseConfigurationKeyword_management functions.

  1. Export the current geodatabase configuration.

    In this example, the gdbconfig file is exported to the C:\temp folder.

    arcpy.ExportGeodatabaseConfigurationKeyword_management (r'c:/temp/adminconnect.sde', r'c:/temp/gdbconfig.txt')
    

  2. Open the text file in a text editor and set RASTER_STORAGE to ST_Raster.
    • If you want all raster datasets and raster catalogs to use the ST_Raster type without people having to specify a keyword, alter the RASTER_STORAGE parameter under the DEFAULTS keyword.
    • If only some of the raster datasets and raster catalogs should use the ST_Raster type, create a custom keyword and set the RASTER_STORAGE parameter for that keyword to ST_Raster.
  3. Save and close the text file.
  4. Import the edited file.

    arcpy.ImportGeodatabaseConfigurationKeyword_management (r'c:/temp/adminconnect.sde', r'c:/temp/gdbconfig.txt')
    

Your new configuration settings are now available for use when data is created.

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2017 Esri. | Privacy | Legal