Reputation: 137
I installed oracle basic instant client v21 x64 RPM package on my ubuntu 20.04 with instant tools same version. Now I cannot run sqlldr tool, sqlldr: error while loading shared libraries: libomsodm.so: cannot open shared object file: No such file or directory is thrown. I tried other tools like sqlplus and it's OK. My envvars is set properly as described in documentation This is my PATH and LD_LIBRARY_PATH vars This is libraries list in lib folder and it not contains libomsodm.so Full error message So my questions are why libomsodm.so not included in basic and tools packages if it is required? Where from can I get it? (I installed all packages from here and there is no libomsodm) I need lsqldr only because I have .ldr and .ctl files, which contains a backup of table data. DB stored on remote server. My last question is how to restore data from ".ldr" and ".ctl" files using linux?
Upvotes: 0
Views: 5542
Reputation: 10496
Update: a new 21.1 "tools" RPM package with the SQL*Loader fix is available on https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
libomsodm.so is included in the same 21c package as SQL*Loader. At a guess you have a mixed set of 19c and 21c Instant Client packages.
$ wget https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-tools-linux.x64-21.1.0.0.0.zip
--2020-12-16 08:52:58-- https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-tools-linux.x64-21.1.0.0.0.zip
Resolving download.oracle.com (download.oracle.com)... 104.80.236.93
Connecting to download.oracle.com (download.oracle.com)|104.80.236.93|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1167332 (1.1M) [application/zip]
Saving to: ‘instantclient-tools-linux.x64-21.1.0.0.0.zip’
instantclient-tools-linux.x64-21.1.0.0.0.zip 100%[==========================================================================================================>] 1.11M 1.12MB/s in 1.0s
2020-12-16 08:53:01 (1.12 MB/s) - ‘instantclient-tools-linux.x64-21.1.0.0.0.zip’ saved [1167332/1167332]
$ unzip instantclient-tools-linux.x64-21.1.0.0.0.zip
Archive: instantclient-tools-linux.x64-21.1.0.0.0.zip
inflating: instantclient_21_1/exp
inflating: instantclient_21_1/expdp
inflating: instantclient_21_1/imp
inflating: instantclient_21_1/impdp
inflating: instantclient_21_1/libnfsodm.so
inflating: instantclient_21_1/libomsodm.so
inflating: instantclient_21_1/libopcodm.so
inflating: instantclient_21_1/sqlldr
inflating: instantclient_21_1/TOOLS_LICENSE
inflating: instantclient_21_1/TOOLS_README
inflating: instantclient_21_1/wrc
cjones@mac:/tmp$
Upvotes: 2
Reputation: 21
To complement the other two responses from Christopher Jones, in case the resolution is not completely clear:
The shared lib libomsodm.so is missing from the Tools Package (RPM)
oracle-instantclient-tools-21.1.0.0.0-1.x86_64.rpm, so this is indeed an Oracle bug/oversight.
Fortunately, the file is provided and present in the Tools Package (ZIP) instantclient-tools-linux.x64-21.1.0.0.0.zip.
So to resolve, after installing the RPM, you need to download and extract the ZIP archive, then install the missing lib as root with
# install -m 755 -o root -g root instantclient_21_1/libomsodm.so /usr/lib/oracle/21/client64/lib/libomsodm.so
# ldconfig
You should now be able to run sqlldr as any non-privileged user: it will display the command syntax instead of a shared library linkage fatal error.
PS: personally, I also manually create a softlink from /usr/bin/sqlldr pointing to /usr/lib/oracle/21/client64/bin/sqlldr, as this is the only tool I need in the Tools package. There's already a /usr/bin/sqlplus softlink created by the Sql*Plus package.
Upvotes: 2
Reputation: 53
I have just encountered the same issue. The existing installation of instantclient was completely purged from the system beforehand, so this isn't due to a mixup between the version 19.x and 21.1 libraries. The library file is actually missing from the .rpm package:
$ wget "https://download.oracle.com/otn_software/linux/instantclient/211000/oracle-instantclient-tools-21.1.0.0.0-1.x86_64.rpm"
...
$ rpm -qlp oracle-instantclient-tools-21.1.0.0.0-1.x86_64.rpm
/usr/lib/oracle
/usr/lib/oracle/21
/usr/lib/oracle/21/client64
/usr/lib/oracle/21/client64/bin
/usr/lib/oracle/21/client64/bin/exp
/usr/lib/oracle/21/client64/bin/expdp
/usr/lib/oracle/21/client64/bin/imp
/usr/lib/oracle/21/client64/bin/impdp
/usr/lib/oracle/21/client64/bin/sqlldr
/usr/lib/oracle/21/client64/bin/wrc
/usr/lib/oracle/21/client64/lib
/usr/lib/oracle/21/client64/lib/libnfsodm.so
/usr/lib/oracle/21/client64/lib/libopcodm.so
/usr/share/oracle
/usr/share/oracle/21
/usr/share/oracle/21/client64
/usr/share/oracle/21/client64/doc
/usr/share/oracle/21/client64/doc/TOOLS_LICENSE
/usr/share/oracle/21/client64/doc/TOOLS_README
I normally install to Ubuntu by converting the .rpm to a .deb via alien --scripts package.deb
. This has worked flawlessly for many years and versions of instantclient up to and including 19.10 (which I have downgraded to.) Therefore, I wonder whether this could be a bug/oversight in Oracle's packaging of the latest version.
Upvotes: 0