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.
- Open your start meu and search for dbca.bat, it is in %ORACLE_HOME%BIN
- Run dbca.bat as admisitrator
Choose Manage pluggable databases
Create a pluggable database
Select a container database in which our pluggable database should be created (in my case only one container database exists (ORADEV)
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
Choose your pdb name (demopdb) and create an admin user
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>
- Modify your tnsnames.ora -file by adding an entry for your DEMOPDB pdb database.
- The file is in :%ORACLE_HOME%\NETWORK\ADMIN
- Add the following entry:
## config. for pluggable database demo
DEMOPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DEMOPDB)
)
)
- Save the file and restart the listener, open a dos command window as an admistrator and type :
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>
- loginto your demopdb as sys
SQL*Plus: Release 12.1.0.2.0 Production on Dim. Nov. 22 14:38:25 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> alter user hr identified by hr account unlock;
- Utilisateur modifiÚ.
- SQL> alter user sh identified by sh account unlock;
- Utilisateur modifiÚ.
- SQL> alter user oe identified by oe account unlock;
Utilisateur modifiÚ.
SQL> conn hr/hr@demopdb;
ConnectÚ.
SQL> conn sh/sh@demopdb;
ConnectÚ.
SQL> conn oe/oe@demopdb;
ConnectÚ.
SQL>
Change the screen resolution with ubuntu15.04 on windows10 hyper-v machine Configure a pluggable database
I like this site so much, bookmarked.