cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HANA - DBCON/DBACOCKPIT Connection to External Oracle Database

Stephen3
Participant
0 Kudos
4,132

Hi All;

We have a S/4HANA 1909 system up and running on AWS using RedHat Linux 8.1.

It is working fine. I am now trying to create a remote connection to an external Oracle database (not SAP data) similar to what we have working in our existing on premise system. I have done the following:

1. Installed the Oracle 19 instant client as per OSS note 819829 on my new S/4HANA application server

2. Updated the .dbenv* and .sapenv* files so the environment variable has a LD_LIBRARY_PATH points to the instantclient

3. run the ldd dboraslib.so test when logged into the Linux system as user devadm. Works. All libraries are found especially libclntsh.so.11.1. It finds the library in the instantclient. See below:

ldd dboraslib.so


linux-vdso.so.1 (0x00007ffd1fb18000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f96916ea000)
librt.so.1 => /lib64/librt.so.1 (0x00007f96914e1000)
libc.so.6 => /lib64/libc.so.6 (0x00007f969111e000)
libclntsh.so.11.1 => /oracle/client/19/instantclient/libclntsh.so.11.1 (0x00007f968d0e9000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f968cd54000)
libm.so.6 => /lib64/libm.so.6 (0x00007f968c9d2000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f968c7ba000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f968c59a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9691f5d000)
libnnz19.so => /oracle/client/19/instantclient/libnnz19.so (0x00007f968be52000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f968bc39000)
libaio.so.1 => /lib64/libaio.so.1 (0x00007f968ba36000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f968b81f000)
libclntshcore.so.19.1 => /oracle/client/19/instantclient/libclntshcore.so.19.1 (0x00007f968b27e000)

However, my problem is when I try and create the entry in the DB02 t-code, when I run a test, I get the error

-- ERROR Database connection AUCS: ADBC error 'Internal error 8,192 has occured'

When I look at the dev_w9 log, I see this error:

Tue Apr 27 16:21:54:477 2021
B Loading DB library '/usr/sap/DEV/D00/exe/dboraslib.so' ...
M *** ERROR => DlLoadLib()==DLENOACCESS - dlopen("/usr/sap/DEV/D00/exe/dboraslib.so") FAILED
"libclntsh.so.11.1: cannot open shared object file: No such file or directory" [dlux.c 550]
M {root-id=06E26080C8381EEBA9F2C5C61BF57A94}_{conn-id=00000000000000000000000000000000}_0
B *** ERROR => Couldn't load library '/usr/sap/DEV/D00/exe/dboraslib.so' [dbcon.c 7118]
B ***LOG BYG=> could not load library for database connection AUCS [dbds 1121]

So for some reason I think the environment variable LD_LIBRARY_PATH is not getting set when SAP runs this test.

I have set all the subdirectories for the instantclient starting from the root directory entry "oracle" equal to 777 so I don't think it is permissions issues.

Any thoughts?

Thanks

Stephen

Accepted Solutions (1)

Accepted Solutions (1)

JamesZ
Product and Topic Expert
Product and Topic Expert

Hi Stephen,
It can be environment variables sync issue, please do ldd like this:

SA38->RSBDCOS0 -> where you can run os command
ldd /usr/sap/DEV/D00/exe/dboraslib.so

Did you see different result compared with pure os ldd?

Then it means SAP is using different environment variables from OS, so please ensure the environment variables were changed like this:

1. edit in sidadm login profile
2. stopsap, kill os process sapstartsrv, start sap
3. SA38->RSBDCOS0 ->env, whether it is the same as OS?

Best regards,
James

Answers (5)

Answers (5)

0 Kudos

Hello James,

Below is the error i get when i test the connection in DBACOCKPIT.

I think from below error it is looking for 11.2 client, Can i proceed with 11.2 client ?

Please suggest

"libclntsh.so.11.1: cannot open shared object file: No such file or directory" [dlux.c 550]

Loading DB library '/usr/sap/DS4/D00/exe/dboraslib.so' ...

*** ERROR => DlLoadLib()==DLENOACCESS - dlopen("/usr/sap/DS4/D00/exe/dboraslib.so") FAILED

"libclntsh.so.11.1: cannot open shared object file: No such file or directory" [dlux.c 550]

{root-id=005056BB6B061EEC8DE13EC975E882F5}_{conn-id=00000000000000000000000000000000}_0

*** ERROR => Couldn't load library '/usr/sap/DS4/D00/exe/dboraslib.so'

dbcon.c 7147]

***LOG BYG=> could not load library for database connection TAS SYSTEM [dbds 1121]

Regards

Shekar

0 Kudos

Hello James,

Thanks for your suggestion and can you suggest if below steps are enough

1)install19c client

OS> mkdir -p /oracle/client/19

OS> cd /oracle/client/19; SAPCAR -xvf <stage>/OCL1964.SAR

OS> ln -s /oracle/client/19/instantclient_19000 /oracle/client/19/instantclient

2)Update the .dbenv* and .sapenv* files so the environment variable has a LD_LIBRARY_PATH points to the instant client.

3)Oracle Net Services files sqlnet.ora and tnsnames.ora both exist and that the environment variable TNS_ADMIN points to the directory location of these two files.

And in which path above files need to be created and what is the content in above files.

4)I have the file dboraslib.so in kernel directory

Let me know if there any other steps missing/required.

Regards

Chandrashekar

0 Kudos

Hello James,

Can you please let me know in SAP note 819829,where it explains any oracle client version is fine?

Iam unable to figure out the same in the said SAP note, please help me in this regards.

Regards

Shekar

JamesZ
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Shekar,

As you are connecting external oracle, for example, BW may connect to oracle, any version (10g, 11, 19c, ect.).
So normally as long as we install the oracle client, and the inside SAP kernel supports the client, then we can install the client.
19c client is the latest, for hana which has "new" client, I would say go ahead to try 19c client.

Best regards,
James

Stephen3
Participant
0 Kudos

I don't know how to mark it as correct.

Former Member
0 Kudos

Hi Stephen, you accepted it, which is the same.

0 Kudos

Hello All,

Can someone let me know how to decide which version of oracle client needs to be installed on HANA.

Regards

Shekar

JamesZ
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Shekar,

Any client version of oracle would be fine, as long as your sap on hana kernel supports the oracle.
For example, normally you can use latest 19c client as sap note 819829.

Best regards,
James

Stephen3
Participant
0 Kudos

Hi James

This worked. Thank you for the assistance.

I never realized that you needed to stop and start the system to reset the environment variables. I thought SAP logged into the server each time it needed to run system level commands.

I also never knew of program RSDBCOS0. Very helpful.

Stephen

JamesZ
Product and Topic Expert
Product and Topic Expert
0 Kudos

Glad to know it works. Yes RSDBCOS0 can let us know any OS behavior from SAP level.
Sometime RSDBCOS0 shows different, for example, user limit change.