Sqlplus error while loading shared libraries libsqlplus so

Hi, I am running dbms_scheduler with job_type => 'executable'. Its failed on : ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired STANDARD_ERROR="sqlplus: error while l...

Hi,
I am running dbms_scheduler with job_type => ‘executable’.
Its failed on :

ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired
STANDARD_ERROR="sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory"

The shell script is as followed:

cat poc_type1.sh
#!/bin/ksh
export ORACLE_HOME=/software/oracle/DB10gR2
export ORACLE_SID=pudwh
export LD_LIBRARY_PATH=/software/oracle/DB10gR2/lib:/usr/lib
export PATH=/software/oracle/DB10gR2/bin:/software/oracle/DB10gR2/OPatch:/usr/ccs/bin:/usr/local/coreutils/bin/:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/software/oracle/dba/scripts/bin:/usr/sbin:/software/oracle/dba/scripts/PERL/bin:/software/oracle/dba/scripts/sh:/software/oracle/dba/scripts:/usr/contrib/bin:/sbin:/usr/omni/bin:/usr/local/bin/:/software/oracle/DB10gR2/jdk/bin
env | sort -o /tmp/capture.env
sqlplus myuser/mypasswd@pudwh @/software/oracle/PATCHES/POC_AD0FFFKMZ6QQ0.sql 

and /tmp/capture.env shows :

$ cat capture.env
A__z="*SHLVL
LD_LIBRARY_PATH=/software/oracle/DB10gR2/lib:/usr/lib
ORACLE_HOME=/software/oracle/DB10gR2
ORACLE_SID=pudwh
PATH=/software/oracle/DB10gR2/bin:/software/oracle/DB10gR2/OPatch:/usr/ccs/bin:/usr/local/coreutils/bin/:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/software/oracle/dba/scripts/bin:/usr/sbin:/software/oracle/dba/scripts/PERL/bin:/software/oracle/dba/scripts/sh:/software/oracle/dba/scripts:/usr/contrib/bin:/sbin:/usr/omni/bin:/usr/local/bin/:/software/oracle/DB10gR2/jdk/bin
PWD=/
SHLVL=1
_=*13911*/bin/env
{code}

Please advice

Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

October 13, 2018
Linux, ORACLE

In this article, I will share the necessary steps to connect to Oracle through the linux operating system and the solutions to the problems we face.

First, we connect to the linux server with ssh as root.

Then, with the help of the following command, we ask where sqlplus is.

[root@localhost /]# find / -name «*sqlplus*»

We get a list below.

/root/oracleinstantclient12.2sqlplus12.2.0.1.01.x86_64.rpm

/var/lib/yum/yumdb/o/d19102c309911ffe91d7c52dcf90fc12105efb20oracleinstantclient12.2sqlplus12.2.0.1.01x86_64

/usr/bin/sqlplus64

/usr/lib/oracle/12.2/client64/bin/sqlplus

/usr/lib/oracle/12.2/client64/lib/libsqlplus.so

/usr/lib/oracle/12.2/client64/lib/libsqlplusic.so

From this list, we see that sqlplus is in the “/usr/lib/oracle/12.2/client64/bin” directory.

So we find out that Oracle Home is in the directory “/usr/lib/oracle/12.2/client64”.

With the following command, we are going to the directory where sqlplus is.

cd /usr/lib/oracle/12.2/client64/bin/

We are running sqlplus with the following command.

[root@localhost bin]# ./sqlplus

When we run sqlplus, we get an error as follows.

./sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

We then run the following commands to load Oracle Home and Library Path.

[root@localhost bin]# export ORACLE_HOME=/usr/lib/oracle/12.2/client64

[root@localhost bin]# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME

When we want to run sqlplus again as below, it asks us the username.

[root@localhost bin]# ./sqlplus

<em>SQL*Plus: Release 12.2.0.1.0 Production on Fri Oct 12 09:16:24 2018

</em><em>Copyright (c) 1982, 2016, Oracle.  All rights reserved.

</em><em>Enter username:

</em>Terminate with the command «Ctrl C».<em>

</em>

Once you see that we can connect, you can connect to the Oracle database you want with the command below.

[root@localhost bin]# ./sqlplus yourusername/[email protected]_or_oracleip:oracleport/oracle_service_name

Example:

!!!! За 3 рабочих дня я наконец то смог это сделать)

Так как нагуглить ничего толкового и подробного я не смог — все приходилось собирать по частям, поэтому напишу как все сделать с самого начала тут: (хотя я думаю, что человек знающий все настроит за пару минут, но, надеюсь, кому то поможет и то, что я написал):

Итак: УСТАНОВКА ORACLE CLIENT на FEDORA 8

1. Регистрируемся на сайте oracle.com
2. Скачиваем пакеты и zip архивы http://www.oracle.com/technology/software/…/linuxsoft.html
я скачивал все, кроме Instant Client Package — Basic Lite.
3. Устанавливаем пакеты и, с помощью unzip разорхивируем архивы в одну папку
4. Настраиваем переменные окружения:

Код:

[root@localhost ~]# export LD_LIBRARY_PATH="/usr/lib/oracle/11.1.0.1/client/lib/"
[root@localhost ~]# export SQLPATH="/usr/lib/oracle/11.1.0.1/client/lib/"
[root@localhost ~]# export NLS_LANG="AMERICAN_AMERICA.CL8MSWIN1251"

Опять же проблема, которую я пока не знаю как решить:
Действие 4 надо проводить каждый раз после открытия нового окна консоли или перезагрузки ПК, так как эти настройки сбрасываются… их надо прописать, как я понял, в /bash.profile, но я пока решил отложить это на потом

5. Затем необходимо найти файл tnsnames.ora (я его нашел в нашей сети… как я понимаю, этот файл устанавливается вместе с сервером оракла, т.е. изначально в моей системе его не было) и пихнуть его сюда:
/home/etc
/usr/lib/oracle/11.1.0.1/client/lib/

Содержание tnsnames должно быть примерно таким:

Код:

# TNSNAMES.ORA Network Configuration File: C:oracleora9networkadmintnsnames.ora
# Generated by Oracle configuration tools.

MYBASE.BASE.RU =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IPшник)(PORT = 1521))
)
(CONNECT_DATA =
(SID = MYBASE)
)
)

6. Затем

Код:

[root@localhost evgenij]# sqlplus login/password@MYBASE.BASE.RU
SQL*Plus: Release 11.1.0.6.0 - Production on Thu Nov 20 11:28:20 2008

Copyright © 1982, 2007, Oracle. All rights reserved.

Connected to:
Oracle9i Release 9.2.0.1.0 - Production
JServer Release 9.2.0.1.0 - Production

SQL>

Все. Надеюсь, кому нибудь поможет данное небольшое руководство)

з.ы. вопрос об пермаментности переменных окружения еще сохранен

Понравилась статья? Поделить с друзьями:
  • Sqlmap py error missing a mandatory option
  • Sqlmap 500 error
  • Sqliteexception sqlite error no such table
  • Sqliteexception sql logic error no such table users
  • Sqlite3 как изменить тип данных столбца