Skip to Content
0

Oracle database connection error: OCI returned error code -1

Apr 05, 2017 at 01:37 PM

380

avatar image
Former Member

Hi,

I am having problems to set connection between Solman 7.2 ABAP system with sybase DB and managed system's Oracle database. It appears the following error when I execute ADBC_TEST_CONNECTION report:

Could not open connection <ID>.
sql error 1- occured:
con=1(<ID>): OCI returned error code -1.

I also check the connection from OS using tnsping having the following error:

I installed oracle instant client in solman abap system and I also defined those enviroment variables:

LD_LIBRARY_PATH=/usr/sap/<SID>/SYS/global/syb/linuxx86_64/sybodbc:/sybase/OSP/ASE-16_0/lib:/sybase/<DBID>/OCS-16_0/lib:/sybase/<DBID>/OCS-16_0/lib3p64:/sybase/<DBID>/OCS-16_0/lib3p:/usr/sap/<SID>/SYS/exe/run:/usr/sap/OSP/SYS/exe/uc/linuxx86_64:/oracle/instantclient_11203

TNS_ADMIN=/usr/sap/<SID>/SYS/profile/oracle

tnsnames.ora file contains

It seems that it can't find the TNS file when it is trying to do the connection but <sid>adm user has suficient permissions.

I have been trying for a long time to find the solution but I haven't gotten anything.

Any idea about the solution for this error?

Thanks.

Regards.

captura.png (15.3 kB)
captura1.png (10.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

James Zhang
Apr 05, 2017 at 11:50 PM
0

Hi,

Have you checked SAP note :

1261329 - DBA Cockpit: Oracle as a remote database

I am very confident the issue will be solved if the note is strictly followed.

Best regards,
James

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I have followed the note, but still I am having the same error.

Regards.

0

Since you followed the note 1261329, please repdouce this issue once and attach the corresponding SAP dev_w* trace.

0
avatar image
Former Member Apr 10, 2017 at 06:24 AM
0

This is what appears in dev_w trace when I try to connect to Oracle DB.


captura2.png (13.2 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Urtzi,


This means oracle client is not successfully loaded, please do verify the client installation as per note 1261329 or note 819829.

Or you can share with us about the details how note 1261329 was applied. As mentioned previously, as long as the note 1261329 is strictly followed, it should work, because this note has been proved years without issues for remote connection setting.

Best regards,
James

0
avatar image
Former Member Apr 27, 2017 at 05:27 AM
0

Hi,

Just to make sure, after you've installed the Oracle instantclient and created the tnsnames.ora file, did you also create sqlnet.ora file at the same directory, for example:

sqlnet.ora

AUTOMATIC_IPC = ON

TRACE_LEVEL_CLIENT = OFF

NAMES.DEFAULT_DOMAIN = WORLD

SQLNET.EXPIRE_TIME = 10

DEFAULT_SDU_SIZE=32768

Did you also check if the SAP Kernel for Oracle database library dboraslib.so is also available? And after all the configuration, you'll need to restart the Solution Manager ABAP system.

Regards,

Michael

Share
10 |10000 characters needed characters left characters exceeded