Oracle 18c : Testing - Installing Sample Schema

18c- Install Sample Schema 

This document is relate to create sample schema under pluggable database.

SQL> alter session set container=PDB1;
Session altered.

Create a tablespace to use for sample schema
SQL> create tablespace example01 datafile '/u02/app/oracle/oradata/TESTDB03/PDB1/example01.dbf' size 100M autoextend on next 10M maxsize 500M;
Tablespace created.

Here I am creating HR sample schema
SQL> @?/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1:
Enter value for 1: Password#123

specify default tablespeace for HR as parameter 2:
Enter value for 2: example01

specify temporary tablespace for HR as parameter 3:
Enter value for 3: TEMP

specify log path as parameter 4:
Enter value for 4: /u02/app/oracle/oradata/TESTDB03/PDB1


PL/SQL procedure successfully completed.


User created.


User altered.


User altered.


Grant succeeded.


Grant succeeded.


Session altered.


Session altered.


Session altered.

******  Creating REGIONS table ....


Table created.


Index created.


Table altered.

******  Creating COUNTRIES table ....

Table created.


Table altered.

******  Creating LOCATIONS table ....

Table created.


Index created.


Table altered.


Sequence created.

******  Creating DEPARTMENTS table ....

Table created.


Index created.


Table altered.


Sequence created.

******  Creating JOBS table ....

Table created.


Index created.


Table altered.

******  Creating EMPLOYEES table ....

Table created.


Index created.


Table altered.


Table altered.


Sequence created.

******  Creating JOB_HISTORY table ....

Table created.


Index created.


Table altered.

******  Creating EMP_DETAILS_VIEW view ...

View created.


Commit complete.


Session altered.

******  Populating REGIONS table ....

1 row created.


1 row created.


1 row created.


1 row created.

******  Populating COUNTIRES table ....

1 row created.
--

1 row created.

--

1 row created.

******  Populating LOCATIONS table ....

1 row created.

--

1 row created.

******  Populating DEPARTMENTS table ....

Table altered.


--

1 row created.


1 row created.


1 row created.


1 row created.

******  Populating JOBS table ....

--

1 row created.

******  Populating EMPLOYEES table ....

1 row created.

--


1 row created.

******  Populating JOB_HISTORY table ....

1 row created.

--
1 row created.


Table altered.


Commit complete.


Index created.


Index created.


Index created.


Index created.

-
Comment created.


Commit complete.


PL/SQL procedure successfully completed.

SQL>


SQL> connect hr/Password#123@pdb1
Connected.
SQL> select count(*) from user_tables;

  COUNT(*)
----------
         7

1 row selected.

SQL> select table_name from user_tables;

TABLE_NAME
--------------------------------------------------------------------------------
REGIONS
COUNTRIES
LOCATIONS
DEPARTMENTS
JOBS
EMPLOYEES
JOB_HISTORY

7 rows selected.

Comments

Popular posts from this blog

Oracle DataGuard – How to resize Redo Log and Standby Redo Log

Exadata - Smart Scan Testing

Exadata Flash Cache - Management