Databases Reference
In-Depth Information
11. In the next screen, check the Sample Schemas flag and click Finish.
12. You are presented with the operations summary. Click OK and wait until the
database creation process is finished.
13. At the end of the creation process, we have to unlock the accounts created. In the
summary form, there is a Password Manager button; click on it, and you will be
presented with the list of accounts created.
14. Find the following accounts: BI, HR, IX, OC, OE, PM, SH and uncheck the second
column (unlocking them). Insert the password for the accounts in the last two
columns, setting them the same as the account name.
You can click on the username column to sort accordingly.
Don't use sample schemas or passwords the same as the
username in production databases!
Now our TESTDB database is ready for experimenting.
How it works...
Oracle DBCA lets us create a database using predefined templates. For our examples, we will
use the default example schemas provided by Oracle (which are installed in the EXAMPLE
tablespace).
The sample schemas are HR (Human Resources), OE (Order Entry), OC (Order Catalog),
PM (Product Media), IX (Information eXchange), SH (Sales History), and BI (Business
Intelligence). We will use mostly HR and SH schemas.
There's more...
If we want to reset the sample schemas to the initial state, we can use the script mksample.
sql located in the $ORACLE_HOME/demo/schema/ directory. This script requires eleven
parameters, with the following syntax:
SQL>@?/demo/schema/mksample systempwd syspwd hrpwd oepwd pmpwd ixpwd
shpwd bipwd default_tablespace temp_tablespace log_file_directory/
Please note that the log_file_directory is an already existing folder
and also the path must be terminated by a slash.
Our database—assuming test as the system and system password—will be reset with the
following statement:
SQL>@?/demo/schema/mksample test test hr oe pm ix sh bi EXAMPLE
TEMP testlog/
 
Search WWH ::




Custom Search