Upgrade Install
This section describes how to upgrade the database components of Oracle Utilities Smart Grid Gateway, including:
Note that the Oracle Utilities Meter Data Management Database Component is a cumulative package comprising of data used by all the Oracle Utilities Smart Grid Gateway and Oracle Utilities Service Order Management adapters.
Supported Upgrade Paths
Upgrade to Oracle Utilities Smart Grid Gateway V2.5.0.1.1 is supported from Oracle Utilities Smart Grid Gateway V2.2.0.3.0, V2.3.0.2.0, V2.4.0.0.0, V2.5.0.0.0, and V2.5.0.1.0.
This section assumes that an existing Oracle Utilities Smart Grid Gateway is installed on top of Oracle Utilities Application Framework, same as a Oracle Utilities Smart Grid Gateway V2.4.0.0.0 installation on top of a Oracle Utilities Application Framework V4.4.0.3.0 installation or a Oracle Utilities Smart Grid Gateway V2.5.0.1.1 installation on top of a Oracle Utilities Application Framework V4.5.0.1.1 installation.
Copying and Decompressing Install Media
To copy and decompress the Oracle Utilities Application Framework and Oracle Utilities Smart Grid Gateway databases:
1. Download the Oracle Utilities Application Framework V4.5.0.1.1 Multiplatform and Oracle Utilities Meter Data Management V2.5.0.1.1 Multiplatform from Oracle Software Delivery Cloud to install any of the following adapters:
Oracle Utilities Smart Grid Gateway Adapter Development Kit
Oracle Utilities Smart Grid Gateway Adapter MV-90 Adapter for Itron
Oracle Utilities Smart Grid Gateway Adapter for Networked Energy Services
Oracle Utilities Smart Grid Gateway Adapter for Itron OpenWay
Oracle Utilities Smart Grid Gateway Adapter for Sensus
Oracle Utilities Smart Grid Gateway Adapter for Landis+Gyr
Oracle Utilities Smart Grid Gateway Adapter for Silver Spring Networks
2. Create a temporary directory, such as C:\OUMSM\temp or /OUMSM/temp (referred to below as <TEMPDIR>).
This directory must be located outside any current working Oracle Utilities application environment. All the files that are placed in this directory as a part of the installation can be deleted after a successful installation.
3. Copy the FW_V4.5.0.1.1.zip and MDM_V2.5.0.1.1.zip files from the downloaded package to the <TEMPDIR>\DB directory.
4. Unzip the FW_V4.5.0.1.1.zip and MDM_V2.5.0.1.1.zip files to a temporary folder named DB. These files contain the database components required to install Oracle Utilities Application Framework and Oracle Utilities Meter Data Management databases.
Installing the CISADM Schema
Make sure to take a backup of your database before carrying out the upgrade process.
You must install Oracle Utilities Application Framework V4.5.0.1.1 prior to installing Oracle Utilities Smart Grid Gateway. The Oracle Utilities Application Framework installation files are located in the FW_V4.5.0.1.1 folder.
This section includes the following:
Installing the Oracle Utilities Application Framework Database Component using OraDBI.jar
Prepare the following parameters before installation:
The name of the database server in which the database is configured - DB_SERVER
The listener port number of the database - PORT
The target database name in which the product is to be installed - SERVICE_NAME
A database user that will own the application schema (for example: CISADM) - DBUSER
Password of the database user that will own the application schema - DBPASS
A database user that has read-write (select/update/insert/delete) privileges to the objects in the application schema (for example: CISUSER). The application will access the database as this user - RWUSER
A database user with read-only privileges to the objects in the application schema. (for example: CISREAD) - RUSER
A database role that has read-write (select/update/insert/delete) privileges to the objects in the application schema. (for example: CIS_USER) - RW_USER_ROLE
A database role with read-only privileges to the objects in the application schema. (for example: CIS_READ)- R_USER_ROLE
Location for jar files. (The Jar files are bundled with the database package) - CLASSPATH
Java Home (for example: <Java Install location>) - JAVA_HOME
Enabling the DBMS_CRYPTO Package
Before installing Oracle Utilities Application Framework V4.5.0.1.1 make sure to provide execute privilege on dbms_crypto package to CISADM user.
Execute the following command as SYS.
grant execute on dbms_crypto to CISADM;
 
You can run OraDBI.jar using either of the following methods:
Using the Interactive Mode
The following procedure lists the steps to install the Oracle Utilities Application Framework V4.5.0.1.1 component using OraDBI.
Run the following command with the defined parameters on the command prompt from the ../DB/FW_V4.5.0.1.1/Install-Upgrade/ directory.
1. Open a command line prompt.
2. Set Java Home.
export JAVA_HOME=<Java Install location>/jdk1.8.0
 
3. Set the class path.
export CLASSPATH=<TEMPDIR>/DB/FW_V4.5.0.1.1/jarfiles/*
 
4. Run the following command:
$JAVA_HOME/bin/java -Xmx1500M -cp $CLASSPATH com.oracle.ouaf.oem.install.OraDBI -p <RWUSER_PASS>,<RUSER_PASS>
 
The utility prompts you to enter values for the following parameters as per your environment:
Name of the database server: <DB SERVER>
Port no: <PORT>
Name of the target database: <SERVICE_NAME>
Name of the owner of the database schema: <DBUSER>
Password of the user name: <DBPASS>
Location of Java Home: (example: <Java Install location>): <Java Home>
Oracle user with read-write privileges to the Database Schema: <CISUSER>
Oracle user with read-only privileges to the Database Schema: <CISREAD>
Oracle database role with read-write privileges to the Database Schema: <CIS_USER>
Oracle database role with read-only privileges to the Database Schema: <CIS_READ>
Enter the name of the target schema where you want to install or upgrade: <CISADM>
Enter the password for the target schema: <CISADM password>
This process generates log files in the directory Install-Upgrade/logs. Make sure to check log files for any errors.
Note: For OraDBI jar, you may receive the following message in the display output or logs. These errors can be safely ignored and the process should proceed to completion.
- 2016-05-23 16:31:38,315 [main] ERROR (common.cryptography.KeyStoreWrapperFactory) The keystore file '<filename>' does not exist.…
This file is either provided by the property com.oracle.ouaf.system.keystore.file or expected to exist at the default file location null Attempting to use the legacy cryptography.
- 2016-05-23 16:31:38,566 [main] INFO (oem.install.OraDBI)
Using the Command Line Mode
Run the following command with the defined parameters on the command prompt from ../DB/FW_V4.5.0.1.1/Install-Upgrade directory.
java com.oracle.ouaf.oem.install.OraDBI -d jdbc:oracle:thin:@<DB_Server>:1521/
<SERVICE_NAME>,<DBUSER>,<DBPASS>,<RWUSER>,<RUSER>,<RW_USER_ROLE>,< R_USER_ROLE>,<DBUSER> -l 1,2 - q true -p <RWUSER_PASS>,<RUSER_PASS>
 
This process generates log files in the directory Install-Upgrade/logs. Make sure to check log files for any errors.
Note: For OraDBI jar, you may receive the following message in the display output or logs. These errors can be safely ignored and the process should proceed to completion.
- 2016-05-23 16:31:38,315 [main] ERROR (common.cryptography.KeyStoreWrapperFactory) The keystore file '<filename>' does not exist.…
This file is either provided by the property com.oracle.ouaf.system.keystore.file or expected to exist at the default file location null Attempting to use the legacy cryptography.
- 2016-05-23 16:31:38,566 [main] INFO (oem.install.OraDBI)
Dropping Column from Database
Connect to CISADM schema through SQL and the drop the following column.
ALTER TABLE CI_XAI_RCVR_CTX DROP COLUMN CTXT_VAL;
 
If you are running Oracle GoldenGate, you may need to drop the log group. Use following script to drop the column.
select LOG_GROUP_NAME from user_log_groups where table_name='CI_XAI_RCVR_CTX'
/
ALTER TABLE CI_XAI_RCVR_CTX DROP supplemental log group GGS_CI_XAI_RCVR_CTX_111254
/
Installing the Oracle Utilities Smart Grid Gateway Database Component
The Oracle Utilities Meter Data Management Database Component is a cumulative package comprising of data used by all the Oracle Utilities Smart Grid Gateway and Oracle Utilities Service Order Management adapters.
Before installing the Oracle Utilities Smart Grid Gateway database component, prepare the following parameters:
The name of the database server in which the database is configured - DB_SERVER
The listener port number of the database - PORT
The target database name in which the product is to be installed - SERVICE_NAME
A database user that will own the application schema (for example: CISADM) - DBUSER
Password of the database user that will own the application schema - DBPASS
A database user that has read-write (select/update/insert/delete) privileges to the objects in the application schema (for example: CISUSER). The application will access the database as this user - RWUSER
A database user with read-only privileges to the objects in the application schema. (for example: CISREAD) - RUSER
A database role that has read-write (select/update/insert/delete) privileges to the objects in the application schema. (for example: CIS_USER) - RW_USER_ROLE
A database role with read-only privileges to the objects in the application schema. (for example: CIS_READ) - R_USER_ROLE
Location for jar files. (The Jar files are bundled with the database package) - CLASSPATH
Java Home (for example: <Java Install location>) - JAVA_HOME
You can execute OraDBI.jar using either of the following methods:
Using the Interactive Mode
The following procedure lists the steps to install the Oracle Utilities Smart Grid Gateway component using OraDBI.
Run the following command with the defined parameters on the command prompt from the ../DB/MDM_V2.5.0.1.1/Install-Upgrade/ directory.
1. Open a command line prompt.
2. Set Java Home.
export JAVA_HOME=<Java Install location>/jdk1.8.0
 
3. Set the class path.
export CLASSPATH=<TEMPDIR>/DB/FW_V4.5.0.1.1/jarfiles/*
 
4. Run the following command:
$JAVA_HOME/bin/java -Xmx1500M -cp $CLASSPATH com.oracle.ouaf.oem.install.OraDBI -p <RWUSER_PASS>,<RUSER_PASS>
 
The utility prompts you to enter values for the following parameters as per your environment:
Name of the database server: <DB SERVER>
Port no: <PORT>
Name of the target database: <SERVICE_NAME>
Name of the owner of the database schema: <DBUSER>
Password of the user name: <DBPASS>
Location of Java Home: (example: <Java Install location>): <Java Home>
Oracle user with read-write privileges to the Database Schema: <CISUSER>
Oracle user with read-only privileges to the Database Schema: <CISREAD>
Oracle database role with read-write privileges to the Database Schema: <CIS_USER>
Oracle database role with read-only privileges to the Database Schema: <CIS_READ>
Enter the name of the target schema where you want to install or upgrade: <CISADM>
Enter the password for the target schema: <CISADM password>
This process generates log files in the directory Install-Upgrade/logs. Make sure to check log files for any errors.
Note: For OraDBI jar, you may receive the following message in the display output or logs. These errors can be safely ignored and the process should proceed to completion.
- 2016-05-23 16:31:38,315 [main] ERROR (common.cryptography.KeyStoreWrapperFactory) The keystore file '<filename>' does not exist.…
This file is either provided by the property com.oracle.ouaf.system.keystore.file or expected to exist at the default file location null Attempting to use the legacy cryptography.
- 2016-05-23 16:31:38,566 [main] INFO (oem.install.OraDBI)
Using the Command Line Mode
Run the following command with the defined parameters on the command prompt from ../DB/MDM_V2.5.0.1.1/Install-Upgrade/ directory.
java com.oracle.ouaf.oem.install.OraDBI -d jdbc:oracle:thin:@<DB_Server>:1521/
<SERVICE_NAME>,<DBUSER>,<DBPASS>,<RWUSER>,<RUSER>,<RW_USER_ROLE>,< R_USER_ROLE>,<DBUSER> -l 1,2 - q true -p <RWUSER_PASS>,<RUSER_PASS>
 
This process generates log files in the directory Install-Upgrade/logs. Make sure to check log files for any errors.
Note: For OraDBI jar, you may receive the following message in the display output or logs. These errors can be safely ignored and the process should proceed to completion.
- 2016-05-23 16:31:38,315 [main] ERROR (common.cryptography.KeyStoreWrapperFactory) The keystore file '<filename>' does not exist.…
This file is either provided by the property com.oracle.ouaf.system.keystore.file or expected to exist at the default file location null Attempting to use the legacy cryptography.
- 2016-05-23 16:31:38,566 [main] INFO (oem.install.OraDBI)
 
If you chose to continue, OraDBI first checks for the existence of each of the users specified and prompts for their password, default tablespace, and temporary tablespace.
OraDBI performs the following tasks
Interacts with the user to collect information about the name of Oracle account that will own the application schema (for example: CISADM), password of this account and the name of the Oracle account that the application user will use (for example: CISUSER), and the name of the Oracle account that will be assigned read-only privileges to the application schema (for example: CISREAD).
Connects to the database as CISADM account, checks whether the user already has the application schema installed to verify whether this is an initial installation.
Verifies whether the upgrade path from the current release id to the target release id is supported by the upgrade.
Verifies whether the tablespace names already exist in Storage.xml file (the process aborts, if not).
Upgrades the schema, upgrades the system data, and configures security.
Maintains upgrade log tables in the database.
Updates release ID when the upgrade is completed successfully.
If an error occurs while executing a SQL script or another utility, it logs and displays the error message and allows you to re-execute the current step. Log files OraDBI###.log are created in the same folder as OraDBI and contains all the SQL commands executed against the database along with the results. The log files are incremental so that the results are never overwritten. If warning messages are generated during the upgrade, OraDBI prompts the user at the end of the process.
Users should check the log files to verify the warning messages. Warning messages are only alerts and do not necessary mean a problem exists.
Stores the Schema owner and password in feature configuration table. The password will be stored in encrypted format.
Post-installation Tasks
Generating Database Statistics
During an install process, new database objects may be added to the target database. Before starting to use the database, generate the complete statistics for these new objects using the DBMS_STATS package.
Enabling USER_LOCK Package
For In-bound web services to work the USER_LOCK must be enabled at the database level. This is a one time step. If this is not already enabled please do so using the following steps.
1. Login as SYS user.
2. On SQL prompt run:
@?/rdbms/admin/userlock.sql
 
3. Grant permission by running following SQL:
grant execute on USER_LOCK to public;
Note that grant can also be made to the database user which the Application connects to only instead of to public. For example, cisuser.
Creating Activity Statistics Materialized view
To improve the performance of drill down queries, use the following procedure to create the materialized view and then refresh the materialized view.
1. Navigate to ../DB/MDM_V2.5.0.1.1/Post-Upgrade.
2. Login as CISADM user.
3. At the SQL prompt, run the following:
@Materialized_View_Creation.sql
Configuring Security
To configure the security:
1. Set PATH.
export JAVA_HOME=<Java Install location>/jdk1.8.0
export PATH=$JAVA_HOME/bin:$PATH
 
2. Set CLASSPATH.
export CLASSPATH=<TEMPDIR>/DB/FW_V4.5.0.1.1/jarfiles/*
 
3. Run the following command with the defined parameters on the command prompt.
java com.oracle.ouaf.oem.install.OraGenSec -d
<DBUSER>,<DBPASS>,jdbc:oracle:thin:@<DB_Server>:1521/
<SERVICE_NAME> -a A -r <RW_USER_ROLE>,<R_USER_ROLE> -u
<RWUSER>,<RUSER> -p <RWUSER_PASS>,<RUSER_PASS>
Populating the CI_INSTALL_PROD Table
After completing the Oracle Utilities Smart Grid Gateway database installation, run the scripts based on the adapter being upgraded.
Navigate to ..\MDM.V2.5.0.1.1\Post-Upgrade, connect to the CISADM schema, and run the relevant script.
Adapter
Script
Oracle Utilities Smart Grid Gateway Adapter for Landis+Gyr
SGG_D3_Update.sql
Oracle Utilities Smart Grid Gateway Adapter for Networked Energy Services
SGG_D4_Update.sql
Oracle Utilities Smart Grid Gateway Adapter for Itron
SGG_D5_Update.sql
Oracle Utilities Smart Grid Gateway Adapter for Sensus RNI
SGG_D6_Update.sql
Oracle Utilities Smart Grid Gateway Adapter for Silver Spring Networks
SGG_D7_Update.sql
Oracle Utilities Smart Grid Gateway Adapter for Itron OpenWay
SGG_D8_Update.sql
Oracle Utilities Smart Grid Gateway Adapter Development Kit
SGG_DG_Update.sql
Dropping Index D1T304S3 for Payload Statistic Functionality (Optional)
For an upgrade installation, this index already exists. If you are not using the Payload statistic functionality, or if you have no other SQL scripts referencing these fields, you may drop the index using the following SQL statement.
Connect to CISADM schema and run the following command.
DROP INDEX D1T304S3;