Oracle PSU 11.1.0.7.15: “genclntsh: Failed to link libclntsh.so.11.1”

So here is yet another troubleshooting post. Today I was applying another PSU for an older Oracle 11.1.0.7 database and received the following error after issuing $ORACLE_HOME/OPatch/opatch apply:

The following warnings have occurred during OPatch execution:
1) OUI-67215:
OPatch found the word "failed" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
/usr/bin/ld: crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status
genclntsh: Failed to link libclntsh.so.11.1
/usr/bin/ld: crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status


2) OUI-67215:
OPatch found the word "failed" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
/usr/bin/ld: crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status
genclntsh: Failed to link libclntsh.so.11.1
/usr/bin/ld: crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status

My quick Google search returned only results that indicated I had to set my LD_LIBRARY_PATH. I already had set this environment variable correctly, so I looked on for more answers. In My Oracle Support document 471745.1 I found that I had to install the package glibc-devel:

Read the rest of this entry

Oracle 12c: ORA-00942 on CREATE PLUGGABLE DATABASE

I was eager to try out the new Pluggable Database feature of the newly released Oracle 12c Database. I installed the software, created the database (see my post about the “ENABLE PLUGGABLE DATABASE” clause which I forgot the first time around) and then wanted to create a new Pluggable Database (PDB) like so:

SQL> CREATE PLUGGABLE DATABASE kdb121p1 ADMIN USER simon IDENTIFIED BY tiger;
CREATE PLUGGABLE DATABASE kdb121p1 ADMIN USER simon IDENTIFIED BY tiger
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist

Oh, really strange, what kind of error message is that?
First off, I made sure my main database is a Container Database:

Read the rest of this entry

ORA-01031 on CREATE MATERIALIZED VIEW

Ok, so here is a problem that a developer brought up. I thought that this problem is quite interesting and also a bit confusing. Obviously, according to Oracle, this is not a bug – it’s a feature!

When issuing a CREATE MATERIALIZED VIEW statement for a different schema (as DBA), one might encounter the following error:

dba@KDB01:SQL> CREATE MATERIALIZED VIEW simon.simon_mv AS SELECT * FROM dual;
CREATE MATERIALIZED VIEW simon.simon_mv AS SELECT * FROM dual
                                                         *
ERROR at line 1:
ORA-01031: insufficient privileges

For our setup let’s assume we have two users:

Read the rest of this entry

Datapump with Database Link examples

Whenever one has to move large amounts of data from one database to another, storage space might become an issue. An option to circumvent this problem is to use a database link with Oracle Datapump to move the data from one database to another. This way, the data is exported across the network and imported directly into the target database.

In this post, I will provide an example on how to move data via a Oracle Datapump and a database link. This post is based on the excellent entry in Oracle FAQ and basically comments all the steps mentioned in the article.

Read the rest of this entry

ORA-31001: Invalid resource handle or path name “/sys/acls/myacl.xml”

So this happens when you try to add a privilege to an ACL that does not exist:

SQL> EXEC DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE ('myacl.xml', 'SIMON', true, 'connect');
BEGIN DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE ('myacl.xml', 'SIMON', true, 'connect'); END;

ERROR at line 1: ORA-31001: Invalid resource handle or path name "/sys/acls/myacl.xml" ORA-06512: at "SYS.DBMS_NETWORK_ACL_ADMIN", line 384 ORA-06512: at line 1

Oracle Database 11g introduced fine-grained access control to external network services using Access Control Lists (ACLs). This basically allows you to take control over which users access which network resources, regardless of package grants.

Read the rest of this entry

ORA-00845: MEMORY_TARGET not supported on this system

There is always something that gets in the way. One problem I regularly stumble upon when installing a new Oracle 11g R2 installation is the following error when I try to start the database:

SQL> startup nomount;
ORA-00845: MEMORY_TARGET not supported on this system

So I keep this post mainly for my own reference when installing a new database on a Linux system.

This error comes up because you tried to use the Automatic Memory Management (AMM) feature of Oracle 11g R2. Well done, but it seems that your shared memory filesystem (shmfs) is not big enough. So let’s look at the steps necessary to enlarge your shared memory filesystem to avoid the error above.

Read the rest of this entry

SQL*Plus on Debian

In this article, I will describe the steps necessary to install Oracle SQL*Plus on a Debian host. I am using Debian 6.0.5 and will install the “Instant Client” package from Oracle (version 11.2.0.3). First, we will prepare the system for the installation, download the installation package, set all the necessary variables, start SQL*Plus and connect to an instance. So let’s get started…

Before we begin the package installation, we need to make sure the necessary prerequisite packages are installed. Oracle Instant Client requires the libaio package, so let’s install that:

Read the rest of this entry

Hello world

My name is Simon Krenger, I am a Technical Account Manager (TAM) at Red Hat. I advise our customers in using Kubernetes, Containers, Linux and Open Source.

Elsewhere

  1. GitHub
  2. LinkedIn
  3. GitLab