Application Development and Automation 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: 
Read only

Connect to External Database

Former Member
0 Likes
1,258

Hi, expers,

How can I connect my sap system to external database oracle?

I have updated DBCON table for connection and using below code to connect the same.

but how to configure tnsnames.ora file in sap direcotry

PARAMETERS dbs TYPE dbcon-con_name.

DATA carrid_wa TYPE scarr-carrid.

DATA dbtype TYPE dbcon_dbms.

EXEC SQL.

CONNECT TO :dbs

ENDEXEC.

EXEC SQL.

GET CONNECTION :dbs

ENDEXEC.

Any support will be appreciable.

Regards

Rajiv singh.

9 REPLIES 9
Read only

premal_mistry2
Active Participant
0 Likes
1,061

Hi Rajiv,

Use DBCO to configure connection with a Remote Database. Also take a look at the OSS Note : 339092.

Also take a look at this link.

[http://help.sap.com/saphelp_nw04/helpdata/en/df/455ec9747111d6b25100508b6b8a93/content.htm]

Regards,

Premal

Edited by: Premal Mistry on Jul 14, 2009 11:16 AM

Read only

0 Likes
1,061

Thanks Premal,

I have done configuration using DBCO but as long I know there need to enter configuration in TNSNAMES.ORA in SAP Direcorty like oracle.

How can I edit or create the file TNSNAMES.ORA in sap system?

Read only

0 Likes
1,061

Hi Rajiv,

Make sure of the following 3 steps.

1. There are 2 tnsnames.ora files in the netweaver-based systems. One is the traditional in the oracle's network\admin folder.

The other one, the one that SAP DBCO uses in sapmnt\<SID>\sys\profile\oracle.

Make sure you add the tnsname entries right there, as DBCO will read from there.

2. You can also try to go to the command prompt and do a tnsping on your connection name, if it is successfull, you are on track.

3. Finally, the DBCO entry Connection Information, should be same as your GLOBAL_NAME Connection name from your .ora file.

Regards,

Premal

Read only

0 Likes
1,061

I have created a entry using DBCO named SAP_ORA with user /password etc.

and getting path in sap system for oracle that is DIR_ORAHOME /oracle/RTD/920_64 using AL11.

but for tnsnames.ora where to go?

Read only

0 Likes
1,061

Hi Rajiv,

Try this path \usr\sap\<SAP-SID>\SYS\Profile\oracle\.

Regards,

Premal

Read only

0 Likes
1,061

Not getting such path but there one path like below.

/usr/sap/RTD/SYS/profile

but how can I use this and edit this for tnsnames.ora?

Read only

0 Likes
1,061

Hi Rajiv,

Traverse to this path /usr/sap/RTD/SYS/profile in your application server, there you will find a directory named ORACLE . Just go into that directory look for the tnsnames.ora file.

Regards,

Premal

Edited by: Premal Mistry on Jul 14, 2009 12:28 PM

Read only

0 Likes
1,061

Thank you very much for dearest support.

I am locatting the path /usr/sap/RTD/SYS/profile using Tcode : AL11

How can I browse that folder?

Read only

0 Likes
1,061

If you've access to the Server, you can find this path in your SAP Server.

Edited by: Mahesh Reddy on Jul 14, 2009 11:36 AM