Oracle® Database Sample Schemas 10g Release 1 (10.1) Part Number B10771-01 |
|
|
View PDF |
To reset the Sample Schemas to their initial state, from the SQL*Plus command-line interface, use the following syntax:
@?/demo/schema/mksample systempwd syspwd hrpwd oepwd pmpwd ixpwd shpwd
In place of the parameters systempwd
, syspwd
, hrpwd
, oepwd
, pmpwd
, ixpwd
, and shpwd
provide the passwords for SYSTEM
and SYS
, and the HR
, OE
, PM
, and IX
schemas.
The mksample
script produces several log files located in the directory $ORACLE_HOME/demo/schema/log/
:
mkverify.log
is the Sample Schema creation log file.
hr_main.log
is the HR
schema creation log file.
oe_oc_main.log
is the OE
schema creation log file.
pm_main.log
is the PM
schema creation log file.
pm_p_lob.log
is the SQL*Loader log file for PM.PRINT_MEDIA
.
ix_main.log
is the IX
schema creation log file.
sh_main.log
is the SH
schema creation log file.
cust.log
is the SQL*Loader log file for SH.CUSTOMERS
.
prod.log
is the SQL*Loader log file for SH.PRODUCTS
.
promo.log
is the SQL*Loader log file for SH.PROMOTIONS
.
sales.log
is the SQL*Loader log file for SH.SALES
.
sales_ext.log
is the external table log file for SH.COSTS
.
In most situations, there is no difference between installing a particular Sample Schema for the first time or reinstalling it over a previously installed version. The *_main.sql
scripts drop the schema users and all their objects.
In some cases, complex interobject relationships in the OE
or IX
schemas prevent the DROP
USER
... CASCADE
operations from completing normally. To correct these rare cases, use one of the following procedures:
For the OC
catalog subschema of the OE
schema:
Connect as the user OE
.
Execute the script oc_drop.sql
.
Connect as SYSTEM
.
Ensure that no user is connected as OE
:
SELECT username FROM v$session;
Drop the user:
DROP USER oe CASCADE;
For the IX
schemas:
Connect as SYSTEM
.
Ensure that no user is connected as a IX
user:
SELECT username FROM v$session WHERE username like 'IX%';
Drop the schemas by executing the script dix.sql
. You will be prompted for the passwords for the individual users.