Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

external Oracle DB Connectivity

Former Member
0 Kudos

Hi there,

I am attempting to connect to an external Oracle DB from an R/3 system which is also running on Oracle.

I have configured a DBCON entry with CON_ENV = 'PMDB' which refers to the TNSNAMES.ORA entry with the same name in the SERVICE_NAME entry under the connection details. This TNSNAMES file is local to my machine. The CONNECT statement and other Native SQL is in place in the ABAP code.

I am unable to establish the connection using these details - I get a return code of 4 on the CONNECT statement. Any ideas/missing links ?

7 REPLIES 7

Peter_Inotai
Active Contributor
0 Kudos

As far as I know you need also RFC connection to set up for this.

Peter

PS: You might check the online help for details:

http://help.sap.com/saphelp_erp2004/helpdata/en/a3/74caa1d9c411d1950e0000e8353423/frameset.htm

0 Kudos

Hi Peter,

I don't think RFCs are relevant to this from what I've researched in SAP Notes etc.

Former Member
0 Kudos

Hi Richard,

Your problem is very simple.

You try to connect from Application server lever to your local machine, but the connection is made through a background process.

You'll need to addept your local TNSNAMES.ORA file changes to the TNSNAMES.ORA file that is in the SAP landscape (most likely on database server level).

Furthermore, the SAP system must be able to reach your local oracle database (through a share on your system).

This should solve the problem.

Regards,

Rob.

0 Kudos

Many thanks,

That's along the lines I was thinking of.

0 Kudos

I am also trying to do this and gets an ORA-12154 error.

I have created an entry in the DBCON table. I am trying to connect to an external oracle database(it is accessable from the R/3 Oracle database). What entry does SAP expect in the DBCON-CON_ENV field? I tried using the full TNS entry which is XXX.WORLD = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ip address)(PORT = port number))(CONNECT_DATA = (SID = sid value)))

and the name of the connection as XXX(same as the TNS alias). Is this the right way to configure the table?

0 Kudos

Hi there,

Did you get your connection wroking? My question is if you only use TNS alias name in the "con. info" field, how do SAP know the TNS alias' name, if SAP is installed on MS SQL database? No Oracle client installed on SAP server either.

Please don't reply this email if you want to say, please check OSS notes etc. None of OSS notes mention that.

Tahnks!

0 Kudos

Hi there,

Just want to close my question. If SAP is installed on Non-Oracle database, one needs to install Oracle client on SAP sever. One more thing, SAP hided Schema field in the program, if you want to connect to external Oracle database, you need whether to change that program to un-hide the schema field or using the schema user name of external Oracle database for connection.

Hope this helps someone who find it useful.

Thanks!

Weidong