Forum Stats

  • 3,758,235 Users
  • 2,251,357 Discussions
  • 7,870,120 Comments

Discussions

How to connect to the human_resources schemas in 12c?

135

Answers

  • TNX MAN, U ARE THE BOSS

    It works!

    Now, if u can please tell me, how to alter HR user, and log as him.

  • No need, i got it.

    Thank you very much!

  • Are u kidding me? On this link that u gave Overview of the Multitenant Architecture
    

    Am I kidding you about what?

    There is ->
    SQL> ALTER SESSION SET CONTAINER = hrpdb;  
    
    Session altered.
    SQL> SELECT SYS_CONTEXT('USERENV', 'CON_NAME') 
      AS CUR_CONTAINER FROM DUAL;
    
    CUR_CONTAINER
    ------------------------------------------
    HRPDB
    ....................

    That 'HRPDB' is going to be the one that YOU tried to create manually. Even if that was successful there won't be anything in it unless you ran that entire set of scripts in the right order. You will probably want to just delete that HRPDB later.,

    and i dont know how to connect to PDBORCL.....
    What should i do?
    . . . I tryed this -> SQL> connect [email protected] password: < my pw from SYS user > Error: TNS could not resolve the connect identifier specified

    Yes - you need to have an entry in your TNSNAMES.ORA file for SERVICE_NAME = PDBORCL to connect.

  • "That 'HRPDB' is going to be the one that YOU tried to create manually. Even if that was successful there won't be anything in it unless you ran that entire set of scripts in the right order. You will probably want to just delete that HRPDB later.,"

    O, then say so... u were like :O from where did u pull that up? XD

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

  • 9a8s7d6f5g4h3j2k1l
    9a8s7d6f5g4h3j2k1l Member Posts: 75
    edited Jan 29, 2014 7:03PM

    And how to do that in SQL Developer?

    How to connect in Developer as HR user?

  • You don't need to use TNSNAMES.ORA if you use the Basic connection type: just the service name, hostname and port.


  • I still have the problem with connecting to HR user. Cant do it with simple command ->

    SQL> connect hr

    password: hr

    Why did oracle get so complicated, grrrrrr

  • Unknown
    edited Jan 29, 2014 7:08PM
    SQL> connect hr

    That is NOT sql developer.

    We already told you what to do for sql*plus

    Yes - you need to have an entry in your TNSNAMES.ORA file for SERVICE_NAME = PDBORCL to connect.

    You're jumping all over the place - stick to ONE problem at a time.

  • 9a8s7d6f5g4h3j2k1l
    9a8s7d6f5g4h3j2k1l Member Posts: 75
    edited Jan 29, 2014 7:15PM

    Well, subject is now "how to connect to user HR in sqlplus and Developer"

    Ok, first in Sql*plus.

    # tnsnames.ora Network Configuration File: F:\app\product\12.1.0\dbhome_1\network\admin\tnsnames.ora

    # Generated by Oracle configuration tools.

    ORACLR_CONNECTION_DATA =

      (DESCRIPTION =

        (ADDRESS_LIST =

          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

        )

        (CONNECT_DATA =

          (SID = CLRExtProc)

          (PRESENTATION = RO)

        )

      )

    ORCL =

      (DESCRIPTION =

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

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = orcl)

        )

      )

    This is what i have in tnsnames.ora
    What to edit?

    Change orcl for pdborcl?

This discussion has been closed.