Installing the Sales History (SH) Schema
All files necessary to create this schema reside in $ORACLE_HOME/demo/schema/sales_history.
You need to call only one script, sh_main.sql, to create all objects and load the data. Running sh_main.sql accomplishes the following tasks:
Prompts for passwords and tablespace names used within the scripts, as well as datafile and log file directories.
Removes any previously installed SH schema.
Creates the user SH and grants the necessary privileges.
Connects as SH.
Calls the scripts that create and populate the schema objects.
For a complete listing of the scripts and their functions, please refer to Table 4-5.
Note:
The dimension tables PROMOTIONS, CUSTOMERS, PRODUCTS and the fact table SALES are loaded by SQL*Loader. Then, two directory paths are created inside the database to point to the load and log file locations. This allows the loading of the table COSTS by using the external table sales_transactions_ext.
A pair of optional scripts, sh_olp_c.sql and sh_olp_d.sql, is provided as a schema extension. To prepare the Sales History schema for use with the advanced analytic capabilities of OLAP Services, run the sh_olp_c.sql create script. If you want to return to the initial setup of the SH schema, use the script sh_olp_d.sql to erase the effects of sh_olp_c.sql and reinstate dimensions as they were before.
The file used to drop the SH schema is sh_drop.sql.