In Oracle 10 Gb, if we did not select an installation example when creating an instance, we can also create it using the script under $ ORACLE_HOME/demo/schema after creating the instance. For details about the creation method, the official documentation provides the following details:
SampleSchema Scripts and Object Descriptions
Http://download.oracle.com/docs/cd/B19306_01/server.102/b14198/scripts.htm#sthref77
There are also related creation scripts in 11gR1:
Http://download.oracle.com/docs/cd/B28359_01/server.111/b28328/installation.htm#COMSC00002
These scripts will create a series of example users, including HR and OE. These user data allows us to perform some functional tests, and many examples of Oracle documents also use these users.
However, in 11gR2, The mksample. SQL file cannot be found in the $ ORACLE_HOME/demo/schema/directory, and the example user's SQL script is no longer created in each separate subdirectory.
In fact, Oracle isolates the installation of these example users into an installation disk, for example, the installation files for the Linuxx86-64 can be directly downloaded from the OTN:
Http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html
Here, Oracle Database 11g Release 2Examples is the example user installation file we need. But now the installation file is more than 500 mb. If you do not want to download such large content, or you only need HR and OE users, you can download the SQL script from the following URL and decompress it to run it.
Http://st-curriculum.oracle.com/obe/jdev/obe11jdev/11/common/files/sample_schema_scripts.zip
Take HR users as an example:
$ Ls
Hr_cre. SQL hr_main. SQL hr_popul. SQL
$ Sqlplus/as sysdba
SQL> @ hr_main. SQL