Welcome to Salem Houali ‘s Oracle Developer Notes

Install demo schemas in oracle database12c

This tutorial shows how to deploy demo schemas in oracle database 12c
First, we will begin by creating a new pluggable database12c on witch demo schemas should be deployed.

dbca_0

Choose Manage pluggable databases

dbca_1

Create a pluggable database

dbca_2

Select a container database in  which our pluggable database should be created (in my case only one container database exists (ORADEV)

dbca_3

Choose the option: create a pluggable database using pdb file set. This pdb file set is sampleschema.xml, search for it in : %ORACLE_HOME%\assistants\dbca\templates

dbca_5

Choose your pdb name (demopdb) and create an admin user

dbca_7

dbca_8

dbca_9

dbca_10

After your pdb database is created and connected successfuly, you login with sqlplus to setup schema users:
open a dos command window and type : sqplus / as sysdba

Microsoft Windows [version 10.0.10586]
(c) 2015 Microsoft Corporation. Tous droits réservés.

C:\WINDOWS\system32>sqlplus / as sysdba;

SQL*Plus: Release 12.1.0.2.0 Production on Dim. Nov. 22 14:11:17 2015

Copyright (c) 1982, 2014, Oracle. All rights reserved.
ConnectÚ Ó :
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select name, open_mode from v$pdbs where name=’DEMOPDB’;

NAME OPEN_MODE
—————————— ———-
DEMOPDB READ WRITE

SQL>

## config. for pluggable database demo
DEMOPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DEMOPDB)
)
)

Microsoft Windows [version 10.0.10586]
(c) 2015 Microsoft Corporation. Tous droits réservés.

C:\WINDOWS\system32>lsnrctl reload

LSNRCTL for 64-bit Windows: Version 12.1.0.2.0 – Production on 22-NOV. -2015 14:28:17

Copyright (c) 1991, 2014, Oracle. All rights reserved.

Connexion Ó (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
La commande a rÚussi

C:\WINDOWS\system32>

Copyright (c) 1982, 2014, Oracle. All rights reserved.
ConnectÚ Ó :
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

Utilisateur modifiÚ.
SQL> conn hr/hr@demopdb;
ConnectÚ.
SQL> conn sh/sh@demopdb;
ConnectÚ.
SQL> conn oe/oe@demopdb;
ConnectÚ.
SQL>

One Response to “Install demo schemas in oracle database12c”

Leave a Reply