Skip to content | Change text size

ITS home

 

Y2K Inventory Database

Loading Asset Register Data Loading Add Host Data Loading PC Hardware Data Loading PC Software Data

Loading Asset Register Data

The asset register data are loaded monthly. The CSV files is ftp from
vaxA. Check with Irene Law (ext:55732) from AMIS in regard to CSV files.

To ftp asset register files;
mosa> cd ~/equip
mosa> ftp vaxa
      name: system
      password: (get the password from Allan Thorne(ext: 54791))
ftp> cd adp20:[equipment.master]
ftp> dir
ftp> asc
ftp> get isam_eqpt149.dat
ftp> quit
mosa>

The asset register data are loaded into the equip table in tablespace IMP
owned by INV_DBA.
Run the script /usr/users/oracle/admin/script/inv_load.sh.
The inv_load.sh script mainly does;
1 Exec ~/admin/load/trunc_equip.sql - delete all the old data.
2 Exec ~/admin/load/equip.sh - execute /usr/users/oracle/admin/load/equip.dlr
  that run the sql loader.
3 Exec ~/admin/load/delete.sql - delete data where the class code is
  not found in cls_cde from inv_dba.cls.
4 Exec ~/admin/load/select.sql - count the number of records loaded.
5 Exec ~/admin/load/blank_date.sql - clean up the date that is 000000.
6 Exec ~/admin/load/del_invdate.sql - delete data that have invalid date field.
7 Exec ~/admin/load/update.sql - update all date fields.
8 Exec ~/admin/load/cr_equip_ndx.sql - create index equip_equip_num_ndx.

Loading Add Host Data

The add host data are loaded nightly. The CSV files addhostdb.dump is pushed
into the directory /usr/users/oracle/equip/ by the network group.
The add_hst_load.sh script then process the file. It mainly does:

1 Check for the csv file in the directory /usr/users/oracle/equip.
2 Exec ~/admin/load/trunc_add_hst.sql -
  delete the old data in inv_dba.add_hst table.
3 Exec ~/admin/load/add_hst.sh - call ~/admin/load/add_hst.dlr which  run sql
  loader and load the data into the add_hst table.
4 Exec ~/admin/load/del_add_hst.sql - delete the header row in add_hst table.
5 Move the old data file to ~/equip/complete/filename.old.

Loading PC Hardware Data

The PC Hardware Data is loaded when needed. Check with Ian (x55830).
The data sit on the directory ~/equip/LAN and they come from micro group.
The script to load the data is /usr/users/oracle/admin/script/pc_load.sh.
The script mainly does these;

1 Check for CSV date files in ~/equip/LAN directory.
2 Insert the filename into the first field in the  csv file.
3 Append all the CSV data file into the file ~/equip/pc.txt
4 Exec ~/admin/load/drop_pc.sql - drop inv_dba.pc table.
5 Exec ~/admin/load/cr_pc.sql - create new inv_dba.pc table.
6 Exec ~/admin/load/pc.sh - run the sql loader by calling pc.dlr
  which load data into the inv_dba.pc table
7 Exec ~/admin/load/del_pc.sql - delete data that has x_status = 'X'
8 Move the data file to ~equip/complete directory

Loading PC Software Data

The csv data file is laoded when needed. Check with Ian(x55830).
The data file sit on the directory ~/equip/PC and the csv file is soft.txt
Run the script pcsw.sh which load the pc software data into the table
inv_dba.pcsw.