spool C:\storet\orasto2\SIM\SIM201_inst\setup_SIM201_1.log

PROMPT Creating Tablespace 'SIM201_INDEX' 
CREATE TABLESPACE SIM201_INDEX  
DATAFILE 'C:\storet\orasto2\SIM\SIM201_INDEX\SIM201_idx.ora' SIZE 100M
/
 
PROMPT Creating Tablespace 'SIM201_DATA' 
CREATE TABLESPACE SIM201_DATA  
DATAFILE 'C:\storet\orasto2\SIM\SIM201_DATA\SIM201_dta.ora' SIZE 200M
DEFAULT STORAGE (INITIAL 1M NEXT 1M MAXEXTENTS 10)
/

prompt -- create SIM201 schema owner
@@ C:\storet\orasto2\SIM\SIM201_inst\create_SIM201_usr.sql

prompt -- create document/graphic directory
@@ C:\storet\orasto2\SIM\SIM201_inst\create_directory.sql

prompt -- grant connect to storet and storet1
@@ C:\storet\orasto2\SIM\SIM201_inst\grant_connect.sql

prompt -- Create User Roles
@@ C:\storet\orasto2\SIM\SIM201_inst\create_user_roles.sql

PROMPT -- Grant roles to users
@@C:\storet\orasto2\SIM\SIM201_inst\grant_roles_to_users.sql

PROMPT -- Grants for directory
@@ C:\storet\orasto2\SIM\SIM201_inst\grants_to_directories.sql

connect storet/sto2et

prompt -- grant storet to SIM201
@@ C:\storet\orasto2\SIM\SIM201_inst\grant_storet_to_SIM201.sql

connect storet1/sto2et1

prompt -- grant storet1 to SIM201
@@ C:\storet\orasto2\SIM\SIM201_inst\grant_storet1_to_SIM201.sql

connect SIM201/SIM201

prompt -- create SIM201 tables
@@ C:\storet\orasto2\SIM\SIM201_inst\SIM201.tab

prompt -- create SIM201 synonyms for storet and storet1
@@ C:\storet\orasto2\SIM\SIM201_inst\create_STORET_syns

prompt -- create SIM201 constraints
@@ C:\storet\orasto2\SIM\SIM201_inst\SIM201.con

prompt -- create SIM201 sequences
@@ C:\storet\orasto2\SIM\SIM201_inst\SIM201.sqs

spool off 

spool C:\storet\orasto2\SIM\SIM201_inst\setup_SIM201_2.log

prompt -- create SIM201 indexes
@@ C:\storet\orasto2\SIM\SIM201_inst\SIM201.ind

prompt -- create SIM201 procedures and packages
prompt --
prompt -- SIM2_commit:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim2_commit.plb
show errors
prompt --
prompt -- SIM2_import_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim2_import_pkg.plb
show errors
prompt --
prompt -- sim2_export_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim2_export_pkg.plb
show errors

prompt --
prompt -- sim2_import_station_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim2_import_station_pkg.plb
show errors

spool off

spool C:\storet\orasto2\SIM\SIM201_inst\setup_SIM201_3.log

prompt --
prompt -- sim_import_wells_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim_import_wells_pkg.plb
show errors

prompt --
prompt -- sim_import_locations_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim_import_locations_pkg.plb
show errors

prompt --
prompt -- sim_interface_extras_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim_interface_extras_pkg.plb
show errors

spool off

spool C:\storet\orasto2\SIM\SIM201_inst\setup_SIM201_4.log

prompt --
prompt -- sim_import_result_extras:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim_import_result_extras.plb
show errors
prompt --
prompt -- sim_import_result_checks:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim_import_result_checks.plb
show errors
prompt --
prompt -- sim2_import_result_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim2_import_result_pkg.plb
show errors
prompt --
prompt -- sim2_import_project_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim2_import_project_pkg.plb
show errors

prompt --
prompt -- sim2_export_station_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim2_export_station_pkg.plb
show errors
prompt --
prompt -- sim2_export_result_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim2_export_result_pkg.plb
show errors
prompt --
prompt -- sim2_export_project_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim2_export_project_pkg.plb
show errors
prompt --

prompt --
prompt -- sim_export_well_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim_export_well_pkg.plb
show errors

prompt --
prompt -- sim_export_location_pkg:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim_export_location_pkg.plb
show errors

prompt --
prompt -- sim2_station_sort:
@@ C:\storet\orasto2\SIM\SIM201_inst\sim2_station_sort.plb
show errors
prompt --

prompt -- Grant SIM to Roles
@@ C:\storet\orasto2\SIM\SIM201_inst\grant_sim_to_roles.sql

connect storuser/storuser

prompt -- create sim synonyms on STORUSER
@@ C:\storet\orasto2\SIM\SIM201_inst\SIM201.syn

prompt -- update GPS coordinate columns in STORET
@@ C:\storet\orasto2\SIM\SIM201_inst\update_decimal_coord.sql

prompt -- update missing uom in STORET
@@ C:\storet\orasto2\SIM\SIM201_inst\update_uom.sql

connect system/sto2et

PROMPT -- revoke connect from storet and storet1
@@ C:\storet\orasto2\SIM\SIM201_inst\REVOKE_CONNECT.sql

spool off

spool C:\storet\orasto2\SIM\SIM201_inst\done_Setup_SIM201.log
prompt done_Setup_SIM201 
spool off 

quit
