Oracle

How to Configure NTP in Linux Operating Systems?

How to Configure NTP in Linux Operating Systems?

Fadıl

What is NTP?

An abbreviation for “ NTP Network Time Protocol”. NTP is a protocol used to synchronize the clocks of computers on packet-switched networks with variable latency. The protocol is specifically designed to be resistant to the effects of variable delay, thanks to the use of jitter buffers. NTP is one of the oldest Internet protocols still in use. NTP uses the User Datagram Protocol (UDP) over port 123. NTP settings are made from either the  /etc/ntp.conf or /etc/xntp.conf file, depending on which Linux distribution is used.

How to Start and Stop Automatic Database in Linux Operating Systems?

How to Start and Stop Automatic Database in Linux Operating Systems?

Fadıl

Linux Operating Systems will automatically see how to start and stop the database. Together with the database, we will enable Listener Service and Enterprise Manager to automatically turn on and off.

When this operating system is installed, the shutdown or reboot command will shut down.

  1. On our system, we create “.bash_profile için for oracle user. In this article, I configured it according to the features of my system. You need to configure according to your own system.
--- With Oracle user, we will open the ".bash_profile" file in the Home directory as follows.
$ vim .bash_profile

-- After opening the required variables to the file, we save and exit the file.

# Oracle bash_profile Environment Settings

TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=techsoftcenter-db.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
GRID_HOME=/u01/app/11.2.0.3/grid; export GRID_HOME
DB_HOME=$ORACLE_BASE/product/11.2.0.3/db; export DB_HOME
ORACLE_HOME=$DB_HOME; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

alias oraenv='. /home/oracle/.bash_profile'
  1. We are preparing our services that will start at the operating system.
-- we switch to privileged root user mode.

$ su - root 
Password: 
# vim /etc/init.d/dbora

-- Then we make the following changes in the file "/etc/init.d/dbora".

#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# Set ORA_OWNER to the user id of the owner of the 
# Oracle database software.

ORA_OWNER=oracle

case "$1" in
    'start')
        # Start the Oracle databases:
        # The following command assumes that the oracle login 
        # will not prompt the user for any values
          su - $ORA_OWNER -c "/home/oracle/scripts/startup.sh >> /home/oracle/scripts/startup_shutdown.log 2>&1"
        touch /var/lock/subsys/dbora
        ;;
    'stop')
        # Stop the Oracle databases:
        # The following command assumes that the oracle login 
        # will not prompt the user for any values
            su - $ORA_OWNER -c "/home/oracle/scripts/shutdown.sh >> /home/oracle/scripts/startup_shutdown.log 2>&1"
        rm -f /var/lock/subsys/dbora
        ;;
esac
  1. Set the security on the file.
# chmod 750 /etc/init.d/dbora
  1. We’re adding it to the chkconfig layer to work at a startup.
# chkconfig --add dbora
  1. Now we put the opening and closing scripts into the directory where we will create the dbora file as we said before. So we will write the commands that should work on opening and closing into these files. We will then make the necessary configurations for the “oracle” user to access our files.
# mkdir -p /home/oracle/scripts
# chown oracle.oinstall /home/oracle/scripts
  1. Now we can create our startup and shutdown scripts. Here you will need to set the DB parameter to your own system.
-- We create our Startup Script.

# vim /home/oracle/scripts/startup.sh

-- In the file we opened, we enter the following lines.

#!/bin/bash

export ORACLE_SID=orcl
ORAENV_ASK=NO
. oraenv
ORAENV_ASK=YES

# Start Listener
lsnrctl start

# Start Database
sqlplus / as sysdba << EOF
STARTUP;
EXIT;
EOF

# Start Enterprise Manager
emctl start dbconsole

-- We are creating our closing script.

# vim /home/oracle/scripts/shutdown.sh

-- In the file we opened, we enter the following lines.

#!/bin/bash

export ORACLE_SID=orcl
ORAENV_ASK=NO
. oraenv
ORAENV_ASK=YES

# Stop Enterprise Manager
emctl stop dbconsole

# Stop Listener
lsnrctl stop

# Stop Database
sqlplus / as sysdba << EOF
SHUTDOWN IMMEDIATE;
EXIT;
EOF
  1. After that, we will create the privileges and security settings of our scripts.
# chmod u+x /home/oracle/scripts/startup.sh /home/oracle/scripts/shutdown.sh
# chown oracle.oinstall /home/oracle/scripts/startup.sh /home/oracle/scripts/shutdown.sh
  1. That’s all we can do now we can test our services.
# service dbora start
# service dbora stop

This article was written by testing Oracle 11g R2 (11.2.0.3.0) on Oracle Enterprise Linux 6.4.

RMAN-08132: WARNING: Cannot Update Recovery Area Reclaimable File List, Error Resolution

RMAN-08132: WARNING: Cannot Update Recovery Area Reclaimable File List, Error Resolution

Fadıl

Error:

During an RMAN backup, we may receive the following errors.

ORA-00245: check file backup operation failed, we receive a warning.

RMAN-08132: WARNING: cannot update recovery area reclaimable file list, we see the warning.

Reason:

The directory supplied as Snapshot Controlfile in the RMAN configuration cannot be accessed from all RAC servers.
What do we have to do for this?

Solution:

Settings need to be changed. This directory must be given a public directory that is accessible to all servers in the RAC environment.

ORA-12502: TNS:LISTENER RECEIVED NO CONNECT_DATA FROM CLIENT

ORA-12502: TNS:LISTENER RECEIVED NO CONNECT_DATA FROM CLIENT

Fadıl

Error:

When clients attempt to connect to the database, they can not connect with the error “ORA-12502: TNS: listener received no CONNECT_DATA from the client”.

Now we will try to find out both the causes and how to solve this problem.

Reason:

Missing host definition in the local_listener parameter.

Solution:

The definition in the local_listener parameter should be changed as follows.

Missing Host Definition:

(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = node-VIP) (PORT = 1521))))

Correct Host Definition:

(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = node-vip.domain.local) (PORT = 1521))))

If the database is RAC, the definition of sid = ‘XX’ should also be added.

How to Hadoop-3.1.0 Multi-Node Connection and Configuration?

How to Hadoop-3.1.0 Multi-Node Connection and Configuration?

Fadıl

What is Hadoop?

Hadoop is an open-source library written in Java that enables us to process in parallel on multiple machines with large data sets.

Hadoop stores and manages large data on multiple machines.

HADOOP MULTI-NODE INSTALLATION PROCESS

Note: I am creating multi-node in the easiest way by creating and using everything in root mode on default users like (master, slave1, slave2…etc). Please don’t create any Hadoop users like (Hadoop, hduser, …etc) to configure and share Hadoop installations. I am using root user in all machine to make the connection for multi-node.