Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle 12c jdbc connect string for PDB

bobmaganAug 5 2013 — edited Aug 14 2013

I installed the 12c DB on windows with a couple of PDB's. I created my CDB named 'PSPRODDB'.  I want to confirm the jdbc connection info needed for my PDB (named 'test1') as i saw some things stating you needed a '/'

My tnsnames info is:

# tnsnames.ora Network Configuration File: Z:\oracle\product\12.1.0\dbhome_1\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

PSPRODDB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = mymachine.local)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = PSPRODDB)

    )

  )

TEST1 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = mymachine.local)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = TEST1)

    )

  )

ORACLR_CONNECTION_DATA =

  (DESCRIPTION =

    (ADDRESS_LIST =

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

    )

    (CONNECT_DATA =

      (SID = CLRExtProc)

      (PRESENTATION = RO)

    )

  )

LISTENER_PSPRODDB =

  (ADDRESS = (PROTOCOL = TCP)(HOST = mymachine.local)(PORT = 1521))

I can connect to it using SQL plus with connect myuser/mypswd@test1

Is the JDB connect URL to my 'test1' PDB this?

com.myco.database.db.connection.url = jdbc:oracle:thin:@mymachine:1521:/test1

thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 11 2013
Added on Aug 5 2013
4 comments
16,955 views