#!/bin/sh
#*******************************************************************************
#             ISTP REENGENEERING 
#         ORACLE RECONSTRUCTION RULES 
#               NASA/GSFC
#*******************************************************************************
#PURPOSE: Creates the Oracle Database Reconstruction tables.
#
#INVOCATION METHOD: TableBuilder user/pw tablespace_name
#
# EXTERNAL VARIABLES:
# Source                Name               Type   Use  Description
# ----------------------------------------------------------------------------
# buildscript           $recon_base        char    I   location of db build scripts
#
#
#DEVELOPMENT HISTORY:
#
#       Author          Change-ID   Release   Date    Description of Change
#       ------          ---------   ------- --------  ---------------------
#       Y. Azie         Build 1              7/8/97   Initial release
#       A Tung                      R1.3     5/11/98  Switch the order of config_parm.tab
#                                                      with config_parm_master.tab                                                      
#       A Tung                      R1.3A    7/10/98  Added a new table TTCDESTHIST
#
#*********************************************************************************
if test $# -ne 2
then
   echo '*********************************************************'
   echo '    Error, you must enter an Oracle UserID/Password'
   echo '    followed by the name of the tablespace where the'
   echo '    data will be stored.'
   echo '*********************************************************'
   exit
fi

clear

echo ""
echo "**********************************************"
echo "    Creating Oracle Reconstruction Tables  "
echo "**********************************************"


$recon_base/tables/afst.tab                         $1     $2  10240  10240  0  1  unlimited 
$recon_base/tables/afst_undo.tab                    $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/all_states.tab                   $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/bfstnullbad.tab                  $1     $2      1      1  0  1          2
$recon_base/tables/cdm_mfpt.tab                     $1     $2      2      2  0  1          5
$recon_base/tables/config_parm_master.tab           $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/config_parm.tab                  $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/cs_lookupt.tab                   $1     $2      2      2  0  1          5
$recon_base/tables/cs_state_report.tab              $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/cs_state_report_undo.tab         $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/system_state.tab                 $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/system_state_undo.tab            $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/gfstnullgood.tab                 $1     $2      1      1  0  1          2
$recon_base/tables/ifst.tab                         $1     $2  10240  10240  0  1  unlimited 
$recon_base/tables/ifst_undo.tab                    $1     $2  10240  10240  0  1  unlimited 
$recon_base/tables/mnffpt.tab                       $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/mnffpt_undo.tab                  $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/mnflt1.tab                       $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/mnflt1_undo.tab                  $1     $2  10240  10000  0  1  unlimited
$recon_base/tables/mnflt2.tab                       $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/mnflt2_undo.tab                  $1     $2  10000  10240  0  1  unlimited
$recon_base/tables/mnflt3.tab                       $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/mnflt3_undo.tab                  $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/mnflt4.tab                       $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/mnflt4_undo.tab                  $1     $2      5  10240  0  1  unlimited
$recon_base/tables/mnflt5.tab                       $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/mnflt5_undo.tab                  $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/mnfqt.tab                        $1     $2      2      2  0  1          5
$recon_base/tables/recipe.tab                       $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/recipe2.tab                      $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/recon_switches.tab               $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/rules_numbers.tab                $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/sessions_parameters.tab          $1     $2  10240  10240  0  1  unlimited 
$recon_base/tables/trend_time.tab                   $1     $2      2      2  0  1  unlimited
$recon_base/tables/ttcdacct.tab                     $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/ttcdhist.tab                     $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/ttcdvalue.tab                    $1     $2  10240  10240  0  1  unlimited
$recon_base/tables/ttcdesthist.tab                  $1     $2  10240  10240  0  1  unlimited

echo "*******************************************************************************"
echo "     DONE building Oracle Reconstruction tables - see log file for results"
echo "*******************************************************************************"
echo ""
