cancel
Showing results for 
Search instead for 
Did you mean: 

how to connect to oracle DB from sap

Former Member
0 Kudos

Dear ABAPers  ,

i want to make a connection to secondary oracle DB

and after search i found that i have to add the connection to in  DbCO  TCode

but i'm confused with the Connection Info Field and i don't know what to write in it  , i wrote the path to the tnsnames file but it didn't work ,

can anyone help me in this issue ? or tell me how to connect to oracle DB from SAP

thanks in advance ,

Accepted Solutions (0)

Answers (1)

Answers (1)

venkateswaran_k
Active Contributor
0 Kudos

Dear Kareen

Please follow the following steps.

In the DBCO screen

1.  In the box, DB Connection, give any name of the connection. - the name in our SAP programs to connect to the oracle system.

2. In DBMS, choose the option ORA for oracle system.

3. In the user name box, give the name of the oracle system user. We see two boxes for DB password – one is the password box and the other one is the confirm password box. Give the password in both the boxes.

4.  In Conn. Info box, give the name of the Oracle server – you may ask your database Administrator to get the name.   ( make sure that the connection between the sap server and the database server is established)

5.  Check the check box Permanent to make the connection permanent and

6.  give the connection limit as 5.

Regards,

Venkat

<Reward request removed by moderator>

Message was edited by: Vinod Kumar

Former Member
0 Kudos
Re: how to connect to oracle DB from sap

Not Active Contributor

venkateswaran_k
Active Contributor
0 Kudos

Dear Kareem

The Specification of Server name itself is enough for the connection information - I believe

I assume the oracle instance parameters inside that server identifies the database name... 

However, for detail steps follow the following document.

<link to blocked site removed by moderator>

<request removed by moderator>

Regards,

Venkat

Message was edited by: Thomas Zloch

Former Member
0 Kudos

i set the server ip in this field ,

and followed the steps in the mentioned tutorial , but the connection still not successful ,

from your experience , where is the problem ? 

venkateswaran_k
Active Contributor
0 Kudos

Check with your system admin and database admin -

for 

1. whether the connection from your sAP server to Database server is  allowed or not?

2. Database server name - Its IP address verify

3. Are you able to ping that IP address

What is the user name and Password for that connection

Former Member
0 Kudos

dear Venkateswaran K ,

i asked my system admin and he told me that the connection is already established , and i can ping the ip and receive reply , do you have any other suggestions ?


venkateswaran_k
Active Contributor
0 Kudos

Can you plese tell me what is the error message you get?

what is the oracle version?

There should be file called oranames.ora file in the sap app server. Configure it as below example Some skeliton information....

XXX.WORLD (DESCRIPTION (SDU = 32768)

(ADDRESS_LIST (ADDRESS (COMMUNITY = SAP.WORLD)

(PROTOCOL = TCP)

(HOST = Ip Address)

(PORT = Port number)

)

)

(CONNECT_DATA (SID = SID name)

(GLOBAL_NAME = XXX.WORLD)

)

)

Please check with your Database administrator to update the file  oranames.ora

REgards,

Venkat

Former Member
0 Kudos

my version is

10.2.0.4.0

and this is the error message

What happened?

    The error 903 occurred in the current database connection "DEFAULT".

Short text

   An SQL error occurred when executing Native SQL.

venkateswaran_k
Active Contributor
0 Kudos

Boss, that means you have acheived.... the connection is established successfuly.

check your program.. There is a problem in your SQL statment.

Paste your program here.. let me look into that

Former Member
0 Kudos

i'm  sorry to say that but i don't think so , because i checked the connection status

IF sy-subrc <> 0.

     write : 'No Connection Between SQL Server and SAP'.

   ENDIF.

and it always equal 4

venkateswaran_k
Active Contributor
0 Kudos

Hmmm

As per Oracle Error No 903,  it is  a invalid table name ..  Or query is being executed recursively..

You are checking the sy-subrc  which is  ABAP error code... 

sy-subrc will be 4 always as the total execution of the SQL statement is failed..

Can you please paste the EXEC SQL statement block.s...

Former Member
0 Kudos

EXEC SQL.

   SELECT ACCOUNT_NUM into :dbn from PVACCOUNTBALANCE2 .

ENDEXEC.

venkateswaran_k
Active Contributor
0 Kudos

That is it... 

REMOVE the Dot from the Select Statement End.   

There should not be a Fullstop in the select statement.

Hope that is the issue.