cancel
Showing results for 
Search instead for 
Did you mean: 

how to connect to external database oracle from sap

Former Member
0 Kudos

Hi gurus,

I need to connect to oracle database which is an external database from sap.

can any one tell the steps for connectivity and for reading the data from the database that resides in the oracle database.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Perhaps something is wrong with the Oracle Net configuration. For example you need a section with the remote <sid> in tnsnames.ora. Often you can find a more

precise error in the work process trace file dev_w<wp_number> (e.g. via transaction ST11).

carlos_zhang3
Participant
0 Kudos

sorry Naga,

i make a mistake ....

you mean that you want to connect another external ORACLE from SAP via <b>ABAP/4</b> ?

Former Member
0 Kudos

yes,

i want to get the data from external database which is oracle database in to abap program.

i made entry in dbcon table .

how ever when i tried to connect using connect statement, sy-subrc is giving 4.

all data is maintained in external oracle database....from that database i need to read data from one table in to sap abap program.

mike_howles4
Active Contributor
0 Kudos

I believe as well as the DBCON entry, you also have a correctly formed entry in TNSNAMES.ORA

Former Member
0 Kudos

how do i make an entry in TNSNAMES.ORA?

i didn't make any entry in TNSNAMES.ORA file.

if u know any steps , inform me.

mike_howles4
Active Contributor
0 Kudos

The file is usually located in the following path on the central instance (CI) box (if your DB server is on a different box than your app server, this is important to note):

/network/admin

An example entry (Change to fit your Oracle DB)

EXAMPLEDB.WORLD =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = exampleoraclehostbox)(PORT = 1525))

)

(CONNECT_DATA =

(SID = EXAMPLEDB)

)

)

*Note, the .WORLD suffix may or may not need to be there based on your configuration.

You can run ABAP Program in SE38 called 'ADBC_TEST_CONNECTION' to test the connection (it reads from DBCON, so make sure you have that information there as well).

carlos_zhang3
Participant
0 Kudos

Hi Naga,

First you have to check the sqlnet.ora this file and choose the connection mode in server side .

And then install an oracle client in your client side , and copy the sqlnet.ora to your oracle directory .

and now you can access the oracle database via 'SQLPLUS' ..

hope it useful ...

But before do this please take care ... i am not recommend you do this for security .

Best Regards,

Carlos