Skip to Content
avatar image
Former Member

Oracle database connection error: OCI returned error code -1

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Apr 05, 2017 at 11:50 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

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

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

    Add comment
    10|10000 characters needed 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

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

    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

    Add comment
    10|10000 characters needed characters exceeded