Configuring Responder/Smart Grid
Set Up Oracle Database

Version: 10.1

Resource Center Home

Before starting AMI configuration, you will need to run several scripts that generate tables as well as configure existing tables to support AMI events. Follow the steps on this page to run these scripts.

By default, the scripts are installed in the following location: C:\Program Files (x86)\Miner and Miner\Responder\Developer Resources\Implementation Scripts\Oracle\Addons.

These scripts must be run in the order listed.

Script Description

SmartGridAMI_01_ConfigureServicePoints.bat

DO NOT run this script. It converts a field on the ServicePint feature class to use Esri's ST_Geometry data type. Esri does not support a combination of ST_Geometry and blob data types. This script will be removed from future versions.

SmartGridAMI_02_CreateStateStore.sql

Script requires modification. Creates the schema for AMI state store.

SmartGridAMI_03_LoadStateStore.sql

Script requires modification. Loads the AMI state store from the Responder RX_CUSTOMERS table and the ServicePoint_ST feature class.

SmartGridAMI_04_RegisterAMIEvents.bat

Configures the necessary ArcSDE components necessary to support AMI events.

SmartGridAMI_05_CreateConfigStore.sql

Creates the Configuration table for centralized configuration.

SmartGridAMI_05a_LoadEventMapping2010.sql

Run this script only if you are implementing Responder AMI 10.0.2, which leverages the event types defined in the CIM 61968-9 standard tested in the January, 2010. Do not run this script if you have run or plan to run other scripts that load event types (for example, SmartGridAMI_05a_LoadEventMapping201111.sql).

SmartGridAMI_05a_LoadEventMapping201111.sql

Run this script only if you are implementing Responder AMI 10.0.3 or greater, which leverages the event types defined in the CIM 61968-9 2nd Ed. standard tested in November, 2011. Do not run this script if you have run or plan to run other scripts that load event types (for example, SmartGridAMI_05a_LoadEventMapping201110.sql).

SmartGridAMI_06_LoadConfigStore.sql

Loads initial values for centralized configuration.

SmartGridAMI_07_LoadConfigRole.sql

Creates the Smartgrid Administrator role and assigns it to the administrator user.

SmartGridAMI_08_RefreshStateStore.sql

Refreshes the state store based on changes that may have occurred in the ServicePointFeature class or the RX_CUSTOMERS table.

Disassociate ST_Domain_Operators Package

This is not a script, but a set of steps outlined at the bottom of this page. These steps disassociate the st_domain_operators package from the st_domain_stats statistics type.

Use the following steps to run the scripts listed above. Use an application such as SQL Plus to execute these scripts.

Before you begin the set-up process using the scripts described on this page, it is important to first make a backup of the database.

Create State Store

This script creates the AMI tables in the geodatabase. The following pre-requisites exist:

Before executing this script, you'll need the following information.

To edit and then execute this script, follow the steps outlined below.

  1. Right-click SmartGridAMI_02_CreateStateStore.sql and select Edit to open this file for editing.
  2. Look for the following:
/* SET THESE VARIABLES PER SmartGridAMI_01_ConfigureServicePoints.bat OUTPUT! */
SERVICEPOINT_OWNER varchar2(160):='ELECDIST';
RX_CUSTOMERS_OWNER varchar2(160):='RESPONDER';
MULTIVERSIONED_VIEW_NAME varchar2(32):='SERVICEPOINT_MV';
AMI_DATA_TABLESPACE varchar2(30):='SMARTGRID';
AMI_INDEX_TABLESPACE varchar2(30):='SMARTGRID';
  1.  In the above section, you'll need to indicate the following:
    • SERVICEPOINT_OWNER: This is the user that owns the ServicePoint feature class.
    • RX_CUSTOMERS_OWNER: This is the user that owns the RX_CUSTOMERS table. In most instances this will be the Responder user.
    • MULTIVERSIONED_VIEW_NAME: This is the name of the multi-versioned view created or updated by the first script.
    • AMI_DATA_TABLESPACE: This is a location in the geodatabase where data may be stored. Contact your DBA for this tablespace name.
    • AMI_INDEX_TABLESPACE: This is a location in the geodatabase where data may be stored. Contact your DBA for this tablespace name.
  2. Save and close SmartGridAMI_02_CreateStateStore.sql.
  3. Login as the owner of the AMI tables (e.g., smartgrid) and execute SmartGridAMI_02_CreateStateStore.sql. You can execute the script using applications such as SQL Plus.

 

Load State Store

Values in the Meter field of the RX_CUSTOMERS table must be unique. Before executing this next script, ensure that there ar no duplicate values in this field. Before executing SmartGridAMI_03_LoadStateStore.sql, you'll need the following information.

Follow the steps below to edit the SmartGridAMI_03_LoadStateStore.sql script before executing it.

  1. Open SmartGridAMI_03_LoadStateStore.sql and edit the following values:  

/* SET THESE VARIABLES PER SmartGridAMI_01_ConfigureServicePoints.bat OUTPUT! */
SERVICEPOINT_OWNER varchar2(160):='ELECDIST';
RX_CUSTOMERS_OWNER varchar2(160):='RESPONDER';
AUTH_SRID number:=4;
SPATIAL_INDEX number:=234.26326642411;

  1. Enter the owner of the ServicePoint feature class.
  2. Enter the owner of the RX_CUSTOMERS table.
  3. Enter the Auth SRID value.
  4. Enter the spatial index grid size. You only need to enter the number (e.g., 234.26326642411).
  5. Save and close SmartGridAMI_03_LoadStateStore.sql.
  6. Login as the owner of the AMI tables (e.g., smartgrid) and execute the script in an application such as SQL Plus.

    

Register AMI Events

This script registers the AMI_Events database view as a layer with ArcSDE. It also grants View permissions to the owner of the AMI objects so that it can be viewed in ArcMap. This script requires some modification. The script will prompt you to provide the following information:

Follow the steps below to execute the script:

  1. Double-click SmartGridAMI_04_RegisterAMIEvents.bat to launch it.
  2. You will be prompted to review the script's pre-requisites. If you have successfully run the first two scripts, you have met the pre-requisites. Enter y to contine or n to exit the script. Press Enter on the keyboard.
  3. Next, the script prompts you to review the information you will be prompted to provide. This information is listed just above these steps. If you have all the required information, enter y to continue or n to exit the script. Press Enter on the keyboard.
  4. The script will now prompt you for each piece of information. Enter the value required and press Enter on the keyboard for each.
  5. After entering the required information, you will be prompted to review your entries. If they are accurate, enter y. If you wish to make changes, enter n. Press Enter on the keyboard to continue.
  6. Next, the script will inform you that it is about to provide you with the Auth SRID and multi-versioned view name needed for future steps. Press any key to continue.
  7. The next description lets you know where to locate the information you'll need. Press any key to continue.
  8. The script provides you with a sample layer property output where you can see the information you'll need. This is just a sample. Press any key to continue.
  9. Next, the script displays the layer properties from which you can note the following values:
    • Auth SRID
    • Spatial Index Grid Size parameter (Just the number; for example: 234.26326642411)
    • Layer Envelope minx 
    • Layer Envelope maxx
    • Layer Envelope miny
    • Layer Envelope maxy
    • Entities
  10. The script will prompt you to indicate whether the layer properties were displayed successfully. Enter y if the properties were displayed. Enter n if they were not. Press Enter on the keyboard to continue.
  11. Enter the Auth SRID value and press Enter.
  12. Enter the spatial index grid size. This value in the layer properties may look something like this: SPIDX_GRID,GRID0=234.26326642411,FULL. You only need to enter the number (e.g., 234.26326642411). Press Enter the continue.
  13. Next, you'll be prompted to enter the Layer Envelope min/max x/y values. Enter each value and press Enter to continue after each.
  14. Enter the value in the Entities field and press Enter to continue.
  15. After entering the required information, you will be prompted to review your entries. If they are accurate, enter y. If you wish to make changes, enter n. Press Enter on the keyboard to continue.
  16. Verify that the layer was successfully registered. Press y if it was; Press n if errors occurred; you will have the opportunity to re-enter values. Press Enter.
  17. Press any key to exit.

 

Create Configuration Store

This script creates a centralized configuration schema for the Responder AMI integration. Login as owner of the Responder tables (e.g., responder) and run SmartGridAMI_05_CreateConfigStore.sql in an application such as SQL Plus.

 

Load Configuration Store

This script loads the initial values into the centralized configuration (Configuration Manager) of the Responder AMI integration. The settings this script loads into the Configuration Manager may not be accurate for your system. However, you will modify these initial values in the Configuration Manager in a future step.

Execute the script as the owner of the Responder tables (e.g., responder). You can use an application such as SQL Server Client or SQL Server Management Studio. 

 

Load Configuration Role

This script creates a Responder security role for the administrator user required by the Responder AMI integration. Login as the owner of the Responder tables (e.g., Responder). Run SmartGridAMI_07_LoadConfigRole.sql in an application such as SQL Plus.

 

Refresh State Store

This script refreshes the AMI state store table based on changes that may have occurred in the ServicePoint feature class or the RX_CUSTOMERS table. Login as owner of the AMI tables (e.g., smartgrid) and run SmartGridAMI_08_RefreshStateStore.sql in an application such as SQL Plus.

 

Disassociate ST_Domain_Operators Package

This step should be performed only after all of the previous scripts have been succesfully executed. To disassociate the st_domain_operators package from the st_domain_stats type, execute the following command as the SDE user:

SQL> DISASSOCIATE STATISTICS FROM PACKAGES st_domain_operators;

Esri provides additional information on this process: Disassociate the st_domain_operators from the st_domain_stats type in Oracle.

 


Send Comment to documentation@schneider-electric.com