Creating and configuring IEE database schema
Use the following procedure to create the IEE schema with static and default data.
Creating and configuring IEE database schema
-
Obtain the following information, which is required for database schema creation. The next step prompts you to enter this information.
- Database Instance Name
- Database Host Name
- DBA User provisioned in the previous section and password; for example,
system/IEEdev
- AMI Readings Import OS directory location, created in the previous section; for example,
/u01/hvri
- Run SQL*Plus connecting as the DBA user
sqlplus <dba user>/<dba password>
. -
Begin spooling a log of the installation:
SQL> spool deploy_oracle.log
-
Run the IEE deployment script:
SQL> @OracleDatabaseFiles/install/deploy_oracle.pls
-
Enter values when prompted:
Enter value for dba_user_name: <DBA User>
Enter value for dba_password: <DBA User password>
Enter value for database_name: <your database connect string>
Enter value for schema_owner_name: <example: SchemaOwnerName>
Enter value for schema_owner_password: <example: SchemaOwnerPassword>
Enter value for hvri_import_directory: <example: /u01/hvri>
-
Enter value for archive directory:
leave blank, not implemented at this timeNote: It is safe to ignore the expected error messages, ORA-01918: user "shema_owner_name" does not exist, or ORA-01919:role "itronee_role" does not exist.
- The script will execute without further interruption.
-
Stop spooling:
SQL> spool off
-
Review the deploy_oracle.log for any errors by searching for "ORA-".
Creating partitioned tables
-
Edit the script
OracleDatabaseFiles/Partitions/Create/ReadingPartitioned.pls
.-
Consult with the Itron Professional Services delivery team for the earliest year and number of years required for the Reading table.
-
Replace
<####>
with the four-digit year of the earliest year for which Reading data will be stored in IEE. For example creating reading partitions for 2009 data, replace<####>
with2009
. -
Replace
<####+1>
with the four-digit year of the earliest year + 1 for which Reading data will be stored in IEE. For example, for 2009 data, replace<####+1>
with2010
). -
Save the script and exit.
-
If more than one year will be needed, edit the script
AddReadingPartitions.pls
. Replace<####>,
and<##+1>
.Note: You must always creat partitions and tablespaces consecutively with no gaps.
-
Save the script and exit.
-
-
Run SQL*Plus connecting as the schema owner created in the previous section and run the script:
SQL> DROP TABLE READING CASCADE CONSTRAINT;
SQL> alter session set nls_timestamp_format='YYYY-MM-DD HH24:MI:SS.FF';
SQL> @OracleDatabaseFiles/Partitions/Create/ReadingPartitioned.pls
SQL> @OracleDatabaseFiles/Partitions/Create/AddReadingPartitions.pls
-
Repeat steps 1 and 2 for each of the following scripts:
-
DeviceEventPartitioned.pls
, andAddDEPartitions.pls
for table DeviceEvent -
PartitionedDCL.pls
, andAddDCLPartitions.pls
for table DeviceCommLog -
PartitionedRegRdg.pls
, andAddRegRdgPartitions.pls
for table RegisterReadingNote: RegisterReading shares the same tablespaces as Reading.
-
PartitionedRGSPC.pls
, andAddRGSPCPartitions.pls
for table ReadingGroupSPC -
PartitionedVLH.pls
, andAddVLDPartitions.pls
for table ValidationLogHistory -
PartitionedVLDH.pls
, andAddVLDHPartitions.pls
for table ValidationLogDetailHistory
-
Finalizing the IEE database schema creation
-
Gather initial database object statistics as follows:
-
Run SQL*Plus, connecting as the DBA User:
SQL> DBMS_STATS.GATHER_SCHEMA_STATS ( ownname => '<schemaowner>', options => 'GATHER AUTO' );
-
-
Recompile invalid objects:
-
Run SQL*Plus, connecting as the DBA user:
SQL>exec dbms_utility.compile_schema('<schemaowner>');
-
-
Restart the database instance.
-
Create a full backup of the database instance.