2 Replies Latest reply on Dec 27, 2014 9:14 AM by 1002942

    oracle 12c sample schema


      i have successfully installed oracle 12c on windows srv 2012. during installation i checked the sample schema to be installed as well

      but i cannot access the hr schema or the scott schema.

      i tried

      "alter user hr account unlock identified by hr;"

      and the result was user hr does not exist.

      secondly the em express isn't working. luckily for me when i use this command

      exec DBMS_XDB_CONFIG.SETHTTPPORT(8080); it works. i guess the default https doesnt work.

        • 1. Re: oracle 12c sample schema

          Guid 12c realese 2 ( this is without bugs) work 100% XD


          1. Login as SYS ->



          SQL> connect sys as sysdba

          password: <your pw>




          2. Determininig the name of your CDB ->



          SQL> select name, cdb, con_id from v$database;



          NAME      CDB     CON_ID

          --------- --- ----------

          CDB1      YES          0




          3. Determining the name of your PDB ->



          SQL> select name, pdb from v$services order by pdb, name;



          Mine is -> pdborcl




          4. alter pluggable database pdborcl open;

          (that should open the pdb containing the hr user)




          5. alter session set container=pdborcl;

          which should switch your context to that pdb




          6. select table_name from dba_tables where owner='HR';

          that should give you the tables it owns.







          this will unlock user HR




          8. Go to TNSNAMES.ORA file in your instalation folder of 12c

          Use search if you dont know where it is.

          Open with notpad and ADD



          PDBORCL =

            (DESCRIPTION =

              (ADDRESS = (PROTOCOL = TCP)(HOST = Izzy)(PORT = 1521))

              (CONNECT_DATA =

                (SERVER = DEDICATED)

                (SERVICE_NAME = pdborcl)





          * if your name of the pdb is -> pdborcl







          9. Restart ur database.




          10. In SQL plus log as->



          SQL> connect hr@pdborcl

          password: hr



          EUREKA! It works now




          11. In SQL Developer go to TNS mode and chose PDBORCL

          it should work.



          i have done exactly this steps but yet when login as connect hr@pdborcl and insert the password. i get this error ORA-12154: TNS:could not resolve the connect identifier specified

          • 2. Re: oracle 12c sample schema

            solved this by adding the following line to my tsname. thanks people


            PDBORCL =

              (DESCRIPTION =

                (ADDRESS = (PROTOCOL = TCP)(HOST = vm21)(PORT = 1521))

                (CONNECT_DATA =

                  (SERVER = DEDICATED)

                  (SERVICE_NAME = pdborcl.domainname.com)