Home » RDBMS Server » Server Administration » How to add HR Schema (Oracle 12c, window 7)
How to add HR Schema [message #643384] Tue, 06 October 2015 09:42 Go to next message
Bilal Khan
Messages: 128
Registered: April 2010
Location: Pakistan
Senior Member
I install oracle 12c but HR Schema is not available. and no HR user is available.
i take following step
connect with sys as sysdba
then write the following query

select name, cdb, con_id from v$database;

and then
select name, pdb from v$services order by pdb, name;
he
and the name of pdb is 'pdborcl'

then

 alter pluggable database pdborcl open;


then
 alter session set container=pdborcl;



and then

ALTER USER HR IDENTIFIED BY password ACCOUNT UNLOCK;


after that i open the TNSNAMES.ORA file, and add following code and save file

PDBORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Izzy)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdborcl)
    )
  )


then again try to connect with hr schema but its still not connected..

Please help me in this regards.

Thanks.
Bilal
Re: How to add HR Schema [message #643385 is a reply to message #643384] Tue, 06 October 2015 10:56 Go to previous messageGo to next message
Solomon Yakobson
Messages: 3269
Registered: January 2010
Location: Connecticut, USA
Senior Member
Oracle never bothered changing demo install scripts for pluggables. I modified it to support both regular and pluggable databases. Check Oracle Database Sample Schemas are on GitHub

SY.
Re: How to add HR Schema [message #643399 is a reply to message #643385] Wed, 07 October 2015 01:00 Go to previous messageGo to next message
Bilal Khan
Messages: 128
Registered: April 2010
Location: Pakistan
Senior Member
Dear Solomon, I alredy install add pluggable database, but still its not working.
Re: How to add HR Schema [message #643424 is a reply to message #643399] Wed, 07 October 2015 07:28 Go to previous message
Solomon Yakobson
Messages: 3269
Registered: January 2010
Location: Connecticut, USA
Senior Member
I am talking about installing demo schemas, not about installing pluggable databases. Demo schemas are not installed by default. You need to go to demo directory under Oracle home. There you'll find directory human_resources. But as I already mentioned script hr_main.sql doesn't work for pluggable databases. You need to modify it as provided in link I supplied.

SY.
Previous Topic: I've been getting the error In the alert log since the database was built using an rman clone.
Next Topic: Inventory load failed... OPatch cannot load inventory for the given Oracle Home
Goto Forum:
  


Current Time: Thu Mar 28 12:14:34 CDT 2024