Archive for the ‘Information Technology’ Category

How to Solve Connection Error on Oracle Listener Control

September 20, 2017 1 comment

This is an error that occurs from using Oracle’s lsrnctl start command to enable the Oracle database connection listener. Upon using that command, here’s the output of the error:

lsnrctl start
LSNRCTL for Linux: Version - Production on 30-APR-2010 10:42:24
Copyright (c) 1991, 2009, Oracle.  All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/wrath/listener/alert/log.xml
TNS-12547: TNS:lost contact
 TNS-12560: TNS:protocol adapter error
  TNS-00517: Lost contact
   Linux Error: 104: Connection reset by peer
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
This is probably caused by an incorrect configuration in the /etc/hosts file. So, make sure that inside this config file there is an entry for the loopback address like so: PACT localhost
::1 PACT localhost
Note: The PACT value on the configuration file is due to the setup I use during my Oracle database installation. I use PACT as my hostname and have to put PACT as one of the entry in the /etc/hosts. But the point is, you have to have a localhost entry on the and ::1. If done, save the file and start the lsnrctl service once again.
lsnrctl start
LSNRCTL for Linux: Version - Production on 30-APR-2010 10:55:27
Copyright (c) 1991, 2009, Oracle.  All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/wrath/listener/alert/log.xml
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version - Production
Start Date                30-APR-2010 10:55:29
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/wrath/listener/alert/log.xml
Listening Endpoints Summary...
The listener supports no services
The command completed successfully

Changing Hostname on Linux Server

September 14, 2017 1 comment

In your Linux server, you can change the hostname of your server by following this simple steps. I’m using a Centos 6.9 as my server to this tutorial but I’m sure it applies to other Linux distros as well. First of all, edit the network file on the Linux server to change the hostname by typing this command:

vi /etc/sysconfig/network

Then, find the HOSTNAME variable and change it the name as you desired.

Next, apply the hostname change by typing:

hostname [name]

Replace the [name] with the host name that you want. Next, restart the network service to make the changes permanent.

service network restart

Enabling SSH Access to Remote Linux Server

September 14, 2017 Leave a comment

In this tutorial, I’m using Centos 6.9 but I’m sure this configuration applies to every Unix base Linux Server. To enable ssh access from your local computer to a remote Linux Server, first you have to edit the sshd_config file on the remote server. You can find this file in the directory /etc/ssh/sshd_config. Edit the ssh configuration file by typing the command:

vi /etc/ssh/sshd_config

Inside the file find the string #PermitRootLogin yes, and uncomment that line like so:

Save your edited configuration and restart the sshd service by typing the command:

service sshd restart

By typing that command, you will get an output something like this:

Now, do an ifconfig command on the remote server to find out what’s the IP of the remote server:We find out that our remote server is at So, startup an ssh client application such as putty to connect to the remote server.

How to Fix ORA-65093: multitenant container database not set up properly on Oracle 12c

August 11, 2017 Leave a comment

This issue often occurs in a Oracle database 12c installation on Linux. The error stated that multitenant container database not set up properly, which means we have to set the enable_pluggable_database to True. This error occurs whenever we want to mount the database but the multitenant container database was not set up properly. To fix this, connect to your Oracle 12c using the sysdba user:

sqlplus / as sysdba

Next, do a startup nomount command on the SQLPlus command line interface:

startup nomount

Change the value of the enable_pluggable_database system parameter by typing:

ALTER SYSTEM SET “enable_pluggable_database”= TRUE SCOPE = SPFILE;


Now, do a shutdown command on the database and do a startup command again to show that now you can mount the database:

shutdown immediate


How to Install Missing Perl Modules in Linux

August 3, 2017 Leave a comment

When encountering a missing Perl module during an application installation execution such as like this:

You can install the missing Perl module (in this case, IO::Uncompress::Unzip), by typing a yum command like this:

yum install ‘perl(IO::Uncompress::Unzip)’

Press enter and the yum application will automatically search the missing module you input and install it to your Linux system.

How to Install Instant Client for Oracle Database

August 3, 2017 Leave a comment

Instant Client is an Oracle database auxiliary application that contains libraries such as OCI or JDBC to connect to a remote database server. To install Instant Client, it is available in the following link:

Select the Instant Client product that has the same as your Oracle database version. In this tutorial, we are using Oracle database 11g so we will use instant client After you have downloaded the instant client, unpack the zip file and put it under the directory /opt/oracle/instantclient/. After that, make a symbolic link to the file by typing:

ln -s

Also, set file permission to and by typing:

chmod 755
chmod 755

Change to the oracle user that you use to install your Oracle by typing su – oracle. Next, set your system environment accordingly for the instant client directory:

export D_LIBRARY_PATH=/opt/oracle/instantclient/
export ORACLE_HOME=$ORACLE_HOME:/opt/oracle/instantclient/
export PATH=$PATH:/opt/oracle/instantclient/

Troubleshooting Oracle: Unable to Mount Database Due to Invalid PFILE

August 1, 2017 Leave a comment

Recently in Oracle, I encountered an issue regarding the configuration of Oracle Database. Whenever I try to execute a startup command on the database console, the Oracle database gives me the init<SID>.ora can’t be found. So, the very first I do is to check for that particular ORA file, whether it existed or not. You can find your ORA file resides in the <ORACLE_HOME>/dbs folder. Upon inspection of the folder, there is no init<SID>.ora file which is a little bit weird.

So, I decided to clone the existing init.ora file and give the file name init<SID>.ora (Note: The <SID> refers to the SID name you given during the Oracle database installation. If you are not sure what SID you have set on the installation, you can check the tnsname.ora under the directory <ORACLE_HOME>/network/admin and check the SERVICE_NAME variable). Now, check the content of your ORA file that you have cloned:

Few things that need to be verified in this file:

  • The variable db_name has to refer to the Global database name that we have set during the Oracle database installation. I encountered that the db_name is ORCL while during the installation I set it to ACI. So I have to adjust my db_name value to ACI.
  • Make sure your audit_file_dest refers to a valid location. Initially in this file, the variable goes to /ora01/app/oracle/admin/orcl/adump while the valid location is /ora01/app/oracle/admin/aci/adump. Thus, I changed the value into a valid location.
  • Make sure the db_recovery_file_dest is pointing to a valid location. This is no issue for me since it already is pointing to a valid directory.
  • Make sure the control_files variable is pointing to a present control file. The control file is identified by a .ctl extension. In my case, it resides in the directory /ora01/app/oracle/oradata/aci/control01.ctl.

If you are sure with your configuration, don’t forget to save the file. On the command line, login to the Oracle database as sysdba by typing:

sqlplus / as sysdba

Once you are in the Sqlplus console, type as follow to start your database:

STARTUP PFILE=’/ora01/app/oracle/product/11.2.0/db_1/dbs/init<SID>.ora’

If your ORA file configuration is correct, then the Oracle database should successfully mounted the database.