OEM 13.5 – Failed to allocate OCIEnv from Perl corrective actions Recently updated !
At a client, since Enterprise Manager 13.5 Release 1 Update 30 (RU 30) – the April June 2026 update -, that Corrective Action to extend tablespaces stopped to work.
They got two production application completely frozen due to this!
The symptoms were that the Perl script triggered by OEM Agent could not anymore connect to the database. The error was found for instance at $AGENT_HOME/agent_inst/sysman/log/emagent_perl.trc:
WARN: instanceDiskPerformanceMetric.pl: Could not connect to sys/(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=srv0nnnn.xxx.ch)(Port=1521))(CONNECT_DATA=(SID=+ASM))): Failed to allocate OCIEnv
The problem was clear with the Agent version, because by rolling it back, the problem disappeared.
We opened a Service Request, that went its typical way and it is still open. At the end I found the solution myself.
The problem needed to be either with Perl or Client drivers. The Perl was the latest version, seems correctly working.
Then I found the Oracle Support note KB398956 “On OEM 13c : How To Upgrade Perl DB Client Version For 13.5 & 13.4 OEM Agent Home From 12c To 19c”. There, the link for the patch 37099808 to be applied on OEM 13.5 was not working (on 16.07.2026). So I decided to follow the instructions for OEM 13.4.
I downloaded the latest instant client 19.31 and unzipped in a staging area ($STAGING_AREA below).
Then I did what the note above said for OEM 13.4:
emctl stop agent
cd /u00/app/oracle/product/agent/agent_13.5.0.0.0
mv instantclient /tmp/agent_instantclient
cp -ar $STAGING_AREA/instantclient_19_31 .
mv instantclient_19_31 instantclient
cd instantclient
ln -s libclntshcore.so.19.1 libclntshcore.so.12.1
cp -a adrci uidrvci ../bin/
emctl start agent
When testing again, the Corrective Action was back working.
The client is now creating a Gold Image and deploy this agent version everywhere.

