On this activity we are going to install the sample schemas on a 26ai DB
First we need to download file from here:
https://docs.oracle.com/en/database/oracle/oracle-database/26/comsc/installing-sample-schemas.html
unzip and go to directory you want to install:
[oracle@olinux8 human_resources]$ pwd
/tmp/db-sample-schemas-23.3/human_resources
Connect to the PDB and run the install (it will ask for HR password):
SQL> ALTER SESSION SET CONTAINER=DBTEST23PDB1;
Session altered.
SQL> show con_name
CON_NAME
------------------------------
DBTEST23PDB1
SQL> @hr_install.sql
Thank you for installing the Oracle Human Resources Sample Schema.
This installation script will automatically exit your database session
at the end of the installation or if any error is encountered.
The entire installation will be logged into the 'hr_install.log' log file.
Enter a password for the user HR:
Enter a tablespace for HR [USERS]:
Do you want to overwrite the schema, if it already exists? [YES|no]:
****** Creating REGIONS table ....
Table created.
.....
Table provided actual
----------- ---------- ----------
regions 5 5
countries 25 25
departments 27 27
locations 23 23
employees 107 107
jobs 19 19
job_history 10 10
Thank you!
--------------------------------------------------------
The installation of the sample schema is now finished.
Please check the installation verification output above.
You will now be disconnected from the database.
Thank you for using Oracle Database!
Disconnected from Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0
[oracle@olinux8 human_resources]$
SQL> ALTER SESSION SET CONTAINER=DBTEST23PDB1;
Session altered.
SQL> select OWNER, OBJECT_TYPE, count(*) from dba_objects where OWNER = 'HR' group by OWNER, OBJECT_TYPE order by 1,2,3;
OWNER OBJECT_TYPE COUNT(*)
---------- ----------------------- ----------
HR INDEX 19
HR PROCEDURE 2
HR SEQUENCE 3
HR TABLE 7
HR TRIGGER 2
HR VIEW 1
6 rows selected.
SQL>
That’s it!
For a list of 26ai articles, go to HERE
Comments