Skip Headers

Oracle® Database Sample Schemas
10g Release 1 (10.1)

Part Number B10771-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

Resetting the Sample Schemas

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/:

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:

  1. Connect as the user OE.

  2. Execute the script oc_drop.sql.

  3. Connect as SYSTEM.

  4. Ensure that no user is connected as OE:

    SELECT username FROM v$session;
    
    
  5. Drop the user:

    DROP USER oe CASCADE;
    
    

For the IX schemas:

  1. Connect as SYSTEM.

  2. Ensure that no user is connected as a IX user:

    SELECT username FROM v$session WHERE username like 'IX%';
    
    
  3. Drop the schemas by executing the script dix.sql. You will be prompted for the passwords for the individual users.