Forum Stats

  • 3,760,116 Users
  • 2,251,647 Discussions
  • 7,870,977 Comments

Discussions

oracle 12c, install samples hr etc

petrarke
petrarke Member Posts: 7
edited Feb 5, 2014 7:10AM in General Database Discussions

I need help to install Oracle Samples :

- pack containing Samples ?

- operating mode to install and verifying account are installed and unlock

- etc..

Thanks you for your contribution.

Best Answer

  • petrarke
    petrarke Member Posts: 7
    Accepted Answer

    Thanks for all that.

    Until point 7 I replay successfully, but since point 8 I meet some difficulties.

    Look at TNSNAMe.ORA in which I add :

    PDBORCL =

      (DESCRIPTION =

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

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = pdborcl)

        )

      )

    Can you explain Restart ur databse : is it  sql>shutdow; sql>startup; it seem insuffisant. Start up all services produce no effects too.

    So point 9 doesn't run .

    Read you...

    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

    Save.

    9. Restart ur database.

    10. In SQL plus log as->

    SQL> connect [email protected]

    password: hr

    EUREKA! It works now

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

    it should work.

«1

Answers

  • I need help to install Oracle Samples :
    - pack containing Samples ?
    - operating mode to install and verifying account are installed and unlock
    - etc..
    

    Read that entire other thread that SB pointed you to.

    https://community.oracle.com/thread/2623560

    In particular read my reply dated Jan 28, 2014 3:46 PM if you want to avoid a lot of headache and heartache

    The default installation of 12c will create the sample database (PDBORCL) unless you chose not to do that.

    But 12c uses a new multitenant architecture and there are MANY basic things that you do differently. Until you read chapters 17 and 18 of the new Concepts doc (see my reply as I noted above) you are just wasting your time asking questions one at a time.

    If you don't understand that new architecture you won't be able to understand a one-line answer to a question. There are already over a dozen threads in this forum with your same question and it just isn't possible to give a simple answer until you have read about the new architecture.

    Just for starters let's assume you did a basic, default 12c install

    1. A CDB root container will be created named ORCL - read the doc to learn what CDB means

    2. The sample database IS installed - but it is a PDB. Again, the doc chapters explain PDBs

    3. PDBs must use service names and not SIDs.

    4. PDBs will NOT be opened by default. If you just execute STARTUP only the CDB will be opened.

    5. You can't 'talk to' a PDB until it is opened - see item #4 above.

    6. You can't open a PDB unless you use new syntax and commands that did not exist prior to version 12c

    7. The HR schema (and SCOTT, etc) are in the PDBORCL. They are not in the CDB. Doing a startup will NOT give you access to the HR or SCOTT user since those users do NOT exist in the CDB.

    If you don't understand ALL of the above you need to read those two chapters in the Concepts doc.

    After you have done that come back to the forum and continue with this thread.

    Until you do that it is very unlikely that anyone will be able to help you very much.

  • Unknown
    edited Jan 30, 2014 12:02AM
    b92075 wrote:
    
    How to connect to the human_resources schemas in 12c?
    
    are you two classmates?
     

    I had ask last year if one of the moderators could add a 12c topic to the FAQ to at least give us a link to refer people to that covers the basics of this 12c stuff.

    Hopefully a moderator will see these two threads and understand that this is just going to get worse until there is a more productive way to try to help people with this than just reposting the same stuff over and over.

    IMHO even an Oracle expert is going to have some of these issues simply because the architecture and set of commands and system views is both new and different.

  • 9a8s7d6f5g4h3j2k1l
    9a8s7d6f5g4h3j2k1l Member Posts: 75
    edited Jan 30, 2014 5:34AM

    I will make turtorial for you and others, because guid from Oracle will not help you very much. Their instructions dont work.

  • 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.

    7. ALTER USER HR IDENTIFIED BY password ACCOUNT UNLOCK;

    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

    Save.

    9. Restart ur database.

    10. In SQL plus log as->

    SQL> connect [email protected]

    password: hr

    EUREKA! It works now

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

    it should work.

  • 9. Restart ur database.
    
    10. In SQL plus log as->
    
    SQL> connect [email protected]
    password: hr
    EUREKA! It works now

    You were on solid ground until you got to those steps!

    As I said in that other thread:

    And don't forget that those PDBs will NOT get opened by default. You can write a 'startup' trigger to open them automatically
    create or replace trigger Open_PDBs_On_Startup after startup on database  
    begin
        execute immediate 'alter pluggable database all open';
    end;
    /
    
    The more PDBs you have to open at startup the longer that startup is going to take.
    
  • petrarke
    petrarke Member Posts: 7
    Accepted Answer

    Thanks for all that.

    Until point 7 I replay successfully, but since point 8 I meet some difficulties.

    Look at TNSNAMe.ORA in which I add :

    PDBORCL =

      (DESCRIPTION =

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

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = pdborcl)

        )

      )

    Can you explain Restart ur databse : is it  sql>shutdow; sql>startup; it seem insuffisant. Start up all services produce no effects too.

    So point 9 doesn't run .

    Read you...

    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

    Save.

    9. Restart ur database.

    10. In SQL plus log as->

    SQL> connect [email protected]

    password: hr

    EUREKA! It works now

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

    it should work.

  • petrarke
    petrarke Member Posts: 7

    Thanks for all that.

    Until point 7 I replay successfully, but since point 8 I meet some difficulties.

    Look at TNSNAMe.ORA in which I add :

    PDBORCL =

      (DESCRIPTION =

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

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = pdborcl)

        )

      )

    Can you explain Restart ur databse : is it  sql>shutdow; sql>startup; it seem insuffisant. Start up all services produce no effects too.

    So point 9 doesn't run .

    Read you...

This discussion has been closed.