developers

    Forum Stats

  • 3,874,009 Users
  • 2,266,662 Discussions
  • 7,911,694 Comments

Discussions

PDB Service as DEFAULT_LISTENER_SERVICE in 12c

Jawor
Jawor Member Posts: 5 Green Ribbon
edited Aug 5, 2019 9:49AM in General Database Discussions

Hello,

I try to configure listener.ora so that I could log directly into pdb database putting in windows command line:

sqlplus user/user (without user/[email protected]_string)

Unfortunately, I get the message: Invalid username/password because sqlplus still tries to log me into CDB$ROOT.

Below all necessary pieces of my configuration involving the static registration:

listener.ora

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

  (SID_NAME = CLRExtProc)

  (ORACLE_HOME = D:\app\oracle\product\12.2.0\dbhome_1)

  (PROGRAM = extproc)

  (ENVS = "EXTPROC_DLLS=ONLY:D:\app\oracle\product\12.2.0\dbhome_1\bin\oraclr12.dll")

)

(SID_DESC =

  (GLOBAL_DBNAME = pdb)

  (SID_NAME = pdb)

  (SERVICE_NAME = pdb)

  (ORACLE_HOME = D:\app\oracle\product\12.2.0\dbhome_1)           

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

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

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

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

)

)

DEFAULT_SERVICE_LISTENER = pdb

Besides, I defined the local_listener parameter to handle dynamic registration.

show parameter local_listener

LISTENER_ORCL

Below tnsnames.ora with involved connection_strings:

LISTENER_ORCL =

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

I would be grateful for help. Greetings.

Tagged:
AndrewSayerJawor

Best Answer

  • JohnWatson2
    JohnWatson2 Member Posts: 4,513 Silver Crown
    edited Jul 18, 2019 7:15AM Answer ✓

    There is no need to configure anything special in your listener, all you need do is set your LOCAL environment variable to the tnsnames.ora alias you want to use. For example,

    SET LOCAL=PDB

    AndrewSayerJawor

Answers

developers