Thursday, August 27, 2015

How to solve: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

After a fresh install of an Oracle 32-bit client on a 64-bit Linux server, we received the following errors when we tried to use any of the binaries under the $ORACLE_CLIENT_HOME/bin directory:
 error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

It turned out that only the 64-bit version of libaio was installed:
yum list libaio
Loaded plugins: product-id, rhnplugin, security
This system is receiving updates from RHN Classic or RHN Satellite.
Installed Packages
libaio.x86_64  0.3.107-10.el6  @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4
Available Packages
libaio.i686  0.3.107-10.el6  prod-rhel-x86_64-server-6

Solution is to simply install the missing package (output abbreviated):
su -
yum install libaio.i686

downloading Packages:
libaio-0.3.107-10.el6.i686.rpm                                                                                                                                                                    |  21 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libaio-0.3.107-10.el6.i686                                                                                                                                                                            1/1
  Verifying  : libaio-0.3.107-10.el6.i686                                                                                                                                                                            1/1

Installed:
  libaio.i686 0:0.3.107-10.el6

Complete!

How to create a symlink in unix

Syntax:
ln -s /path/physical_file symlink

For example
cd $ORACLE_HOME/lib
ln -s /u01/oracle/product/oracle_client32/lib/libclntsh.so.11.1 libclntsh.so
ls -altr libclntsh.so
libclntsh.so -> /u01/oracle/product/oracle_client32/lib/libclntsh.so.11.1

Monday, August 24, 2015

What does the DEFAULT DEGREE on tables actually mean?

The DOP (degree of parallelism) settings on a table has to do with the number of threads per instance for scanning the table (an integer), or DEFAULT.

When a tables DEGREE setting is set to DEFAULT, it means that the DOP) is calculated via the following formula:

For a single instance:
DOP = PARALLEL_THREADS_PER_CPU x CPU_COUNT

For an Oracle RAC configuration:
DOP = PARALLEL_THREADS_PER_CPU x CPU_COUNT x INSTANCE_COUNT

The DOP for a table can be viewed in either of the *_TABLES views.

SELECT DEGREE
FROM   DBA_TABLES
WHERE  TABLE_NAME = 'EMP'
AND    OWNER = 'SCOTT';


DEGREE
------------------
         1

Tuesday, August 11, 2015

How to use cpio on AIX

I recently received a patch from Oracle support, and when unpacking with unzip, the resulting file was in the cpio format. Unpacking this file, in turn, is done like this:

mkdir install
cd install
cpio -idcmv < 9205_aix5l64_release.cpio

Tuesday, July 28, 2015

How to create and how to extract a .tar file

Create a tar file of all the files in the current directory:
tar cvf myfile.tar *
or put it in a different directory:
 tar cvf $HOME/myfile.tar *
To extract myfile.tar to the current directory
tar xvf myfile.tar 
To a specific directory:
tar xvf myfile.tar -C mydir

Tuesday, July 21, 2015

How to solve ORA-17628: Oracle error 19505 returned by remote Oracle server during clone from active database

After some time, my RMAN "duplicate from active database" script threw the error below:

RMAN-03009: failure of backup command on c1 channel at 07/21/2015 12:13:15
ORA-17627: ORA-12577: Message 12577 not found;  product=RDBMS; facility=ORA
RMAN-12019: continuing other job steps, job failed will not be re-run

When I checked the alert log, it was clear

IBM AIX RISC System/6000 Error: 28: No space left on device

Solution: obvious.

How to solve ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified during clone from active database

During an attempt to clone from active database, the following error was thrown:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/21/2015 10:06:15
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on c1 channel at 07/21/2015 10:06:15
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified
ORA-17629: Cannot connect to the remote database server

This seems pretty obvious, since the error stack states that there is a connection problem, but it's easy to overlook if you run your command from the destination server, and like in my case, checked that all connections work, that the passwords are identical etc etc.

The solution is simply to add the source and the destination connect descriptor in the $TNS_ADMIN/tnsnames.ora files on both the source and auxiliary server.


See my other article on active database cloning for a more detailed description of the required setup.