cancel
Showing results for 
Search instead for 
Did you mean: 

DBCON Setting to connect to Oracle

Former Member
0 Kudos

I am working on a scenario to connect to PI Java Schema Tables on Oracle DB.

Could someone shed some light on what should be the value in the CON ENV field?

DATABASE_NAME;JAVASCHEMA_NAME

or Just JAVASCHEMA_NAME

or

HOSTNAME:1521;JAVASCHEMA_NAME

Pls advice.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member218171
Participant
0 Kudos

Hi Vicky,

As far as I know, there are 2 Oracle schemas when you have a dual stack PI System:

SAPSR3 = ABAP Oracle schema

SAPSR3DB = Java Oracle schema

The Oracle port depends on the listener... usually it's 1521.

Hope it helps!

Former Member
0 Kudos

Thanks for your reply. Yes that is correct.

However I would appreciate if you could shed some light on what would be the values in CON ENV to connect to Java schema in DBCON transaction.

former_member218171
Participant
0 Kudos

Hi Vicky,

If you need to configure a connection in tx. DBCO with an Oracle Database, you need to create first a service in Oracle Net Manager in your SAP instance server. The name of the service is used in the Tx. DBCO. Example:

Hope it helps!

Former Member
0 Kudos

But where do we mention the schema name?

Pls note that both PI ABAP and Java Schema tables are on the same oracle database.

former_member218171
Participant
0 Kudos

In that case you need to specify the schema in the SQL statement... and use the connection created in Tx. DBCO. Example>

SELECT * FROM QRHWORLD.SCHEMA.TABLE (Schema for ABAP is SAPSR3 and for Java it's SAPSR3DB)

pr11061983
Explorer
0 Kudos

Try:

e.g.: jdbc:oracle:thin:@proton.mke.xyz.com:1521:proton

Pankaj

Former Member
0 Kudos

But this would require NATIVE SQL right ?

and I have to use CL_SQL_CONNECTION....right?

One more thing...

If I use SELECT * FROM QRHWORLD.SCHEMA.TABLE like you mentioned above....how to do I declare a internal table for this TABLE.

Thanks for your continued support and patience...

former_member218171
Participant
0 Kudos

Yes, that's correct. You can declare an internal table with ABAP code, for example:

data:

internaltable LIKE remotetable OCCURS 0 WITH HEADER LINE.

  SELECT *

  FROM remotetable

    INTO CORRESPONDING FIELDS OF TABLE internaltable

    WHERE etc...

Hope this helps!