Saturday 10 March 2018

Setting Up Prerequisites for Oracle DB 11.2.0.4 Installation in Oracle Linux 7.2---Part II

In our previous article, we’ve shown you how to In our previous article, we’ve shown you how to Setting Up Prerequisites for Oracle DB 11.2.0.4 Installation in Oracle Linux 7.2---Part I

In this article we will cover installation and configuration of Oracle DB 11.2.0.4 Installation in Oracle Linux 7.2, along with some Oracle post installation instructions.


1.Below is the location of DB present in my testing environment
   /home/oracle/OID/DB
   Inside DB go to database folder and click on ./runinstaller

2. Our Installer has been launched here. 
    For every steps we need to move forward by
    Clicking Next or OK.. I’m going to skip this step as 
    I don’t want security updates.
    Un-check the check box and mark the checkbox that say “Wish to receive
    security updates via My Oracle Support“.
3. Click on Next, you will get a error saying that you’ve not
    provided and email address click Yes to continue
4. While we skipped the email step by default it will choose skip
    software updates Click next to continue
5. Next, choose the type of installation, I’m choosing the first option to
   Create and configure a database.
6. I’m going to choose Server Class here. If we need to install in any
   Desktop machines we can choose the above Option as Desktop Class.
  


7. We are going to setup only single instance database installation here.
    So, select the first option
8. Choose the Advance install option to get more option while
     going through Installation steps.
9. By Default Language will be chooses as English.
    If you need to change according to your language,
     choose from the below list
10. Time to choose which edition of database installation we looking for.
      For large scale Productions we can use Enterprise 
     or if we need standard edition
     or we can choose the options as mentioned there.
     We need more than 6.5 GB space for Enterprise installation because
     database Population will grow soon/increase.
11. Enter the Oracle base installation location,
      here all installed configurations files will be stored.
     Here you need to define the location of oracle installation path,
     as we created the location in step #12 in the first part of this article.
12. For the first time installation, every Inventory files will be created
      under ‘/u01/app/oralnventory‘ directory.
      We have created the group oracle for installation.
      So now the oracle group has permission to access Inventory Directory.
      Let us choose the Oracle as the Group for Operating system group.
13. Select the type of database, you want to create.
       Since, we are using for General purpose, so choosing general from
       the below options and click Next.
14. Specify the Global Database name for uniquely identified and
     un-check the Create as Container database,
     as here we are not going to create multiple databases.

 15. In my installation, I have assigned 4GB of Memory to my virtual machine,
      but this is not enough for Oracle. Here we need to Enable allocate memory
      automatically for the use of system global Area.

     Check the box that says Enable Automatic Memory Management and
     keep the default allocate memory.
     If we need some sample schema’s we can check and continue for installation.
     In Character set select Use Unicode(AL32UTF8) and click on Next
16. We need to choose the location to store the database storage.
       Here I’m going to assign ‘/u01/app/oracle/oradata‘  location to
       save the databases and Click Next to continue to installer steps.
17. If we have to Enable recovery options, then we have to
      check the Enable Recovery.
      In real environment these options are Compulsory to setup.
      Here to enable this option we need to add separate group and we need to
     define one of the file system location rather than default location 
     where our database save.
18. We need to define the password for starter database which
      all pre-loaded while the installations.
      Password must contain alphanumeric, upper_case and lower_case.
19. We need to provide system privileges to create database for that
      we need to choose the oracle group. Choose oracle for every options.
20. At last we can review every settings before database population.
      If we need any changes we can edit the settings.
21. Installation started to Preparation and copying files.
      This will take long time to complete according to our Hardware Resource.
Click on Next
22. During setup process, it will ask to run two scripts as a root
       user as shown in the below picture.

23. That’s it! We’ve successfully completed Database Configuration,
      now click Next to continue installation process.
24. Finally Oracle Database installation was successfully completed.
      Click on Close to quit the Oracle Installer
25. After restarting machine, verify that the listener is
      up and running using ‘lsnrctl status‘ command

 26. Next login into Oracle database as a Operating system user using
        sysdba and start-up the database
       In my case already DB is up and running .
27. If listener does not start, you need to replace the domain name
        with local IP address 127.0.0.1 in below file.


That’s it! Finally we’ve successfully completed Setting Up Prerequisites for Oracle DB 11.2.0.4 Installation in Oracle Linux 7.2
If in-case any errors you get while setting up Setting Up Prerequisites for Oracle DB 11.2.0.4 Installation in Oracle Linux 7.2

Feel free to drop your comments.


Regards,
Aditya.

Setting Up Prerequisites for Oracle DB 11.2.0.4 Installation in Oracle Linux 7.2---Part I

Requirements

1.Recommended minimum RAM needed for Oracle is 2GB or more.
2.Swap must be enabled double the size of RAM.
3.Disk space must be more than 8GB, its depends on edition which are 
   we going to choose for installing.
4./tmp directory must have free space more than 1GB for error free installation.
5.Supported Linux operating systems are RHEL, Centos, Oracle.
6.Both x86_64 and i686 packages are required for installation.
7.Screen resolution must be more than 1024×768 resolution.

Below is my Testing Environment

IP Address       :           192.168.65.130
Host-name      :           oidrep.localdomain

Note:-use root login for all below installation instructions


1.)If you’ve not set your system hostname, edit the system hosts file
   ‘/etc/hosts‘ and enter your hostname entry along with IP address as shown below.
   
2. Now change the SELinux mode to permissive and restart the system to
       make Permanent changes for selinux.





Installing Packages and changing Kernel Values

1.Login as root and install following below required dependencies.

yum install binutils.x86_64
yum install compat-libcap1.x86_64 
yum install compat-libstdc++-33.x86_64 
yum install compat-libstdc++-33.i686 
yum install compat-gcc-44 
yum install compat-gcc-44-c++ 
yum install gcc.x86_64 
yum install gcc-c++.x86_64 
yum install glibc.i686
yum install glibc.x86_64 
yum install glibc-devel.i686 
yum install glibc-devel.x86_64  
yum install ksh.x86_64
yum install libgcc.i686
yum install libgcc.x86_64
yum install libstdc++.i686
yum install libstdc++.x86_64
yum install libstdc++-devel.i686 
yum install libstdc++-devel.x86_64 
yum install libaio.i686
yum install libaio.x86_64 
yum install libaio-devel.i686
yum install libaio-devel.x86_64
yum install libXext.i686 
yum install libXext.x86_64 
yum install libXtst.i686 
yum install libXtst.x86_64
yum install libX11.x86_64 
yum install libX11.i686 
yum install libXau.x86_64
yum install libXau.i686
yum install libxcb.i686 
yum install libxcb.x86_64
yum install libXi.i686 
yum install libXi.x86_64 
yum install make.x86_64 
yum install unixODBC 
yum install unixODBC-devel 
yum install sysstat.x86_64

2.After installing all the above needed packages, now it’s time to do some 
   changes at kernel level parameters in ‘/etc/sysct.conf file.

fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
Save and quit using wq!
3.Once you’ve added above values, now issue following command to take
    new changes into effect.
   use command sysctl -p
4.Restart the machine and following below for installing Oracle database.
5.Create the new groups Oracle inventory, OSDBA and OSOPER
  for Oracle installation.
   groupadd -g 54321 oracle
   groupadd -g 54322 dba
   groupadd -g 54323 oper
   groupadd -g 54324 oinstall
6. Create the new user oracle and add the user to already created groups.
    useradd -u 54324 -g oracle -G dba,oper oracle
    usermod -a -G oinstall oracle
    passwd XXXXX
7. If your system is enabled with firewall, you need to disable or
    configure it according to your needs.
    To disable it, run the following commands.
    service firewalld status
    service firewalld stop
    service firewalld status
8.Create the following directory for installing Oracle and change the
   ownership and grand permission to the newly created directory
    using recursive.
   mkdir -p /u01/app/oracle/product/12.1.0/db_1
   chown -R oracle:oinstall /u01
   chmod -R 775 /u01
   ls -l /u01
9.We need to add the environmental variable for oracle user.
   Open and edit the profile file of oracle user and append the 
   oracle environment entries.
   Here we don’t need to use sudo command, 
   as we are already logged in as root user.

vi /home/oracle/.bash_profile

export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=oidrep.localdomain
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=orcl
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Save and exit the vi editor using wq!
10.Again, this step is not required, if you are already using root account, 
      just switch to oracle user for further instructions.
11.Here we need to check for the resource limits for oracle installing user.
     Here our Oracle installer user is oracle.
     So we must be logged in as oracle user, while doing resource check.
     Check for the soft and hard limits for file descriptor settings 
      before installation.
    ulimit -Sn
    ulimit -Hn
    ulimit -Su
    ulimit -Hu
    ulimit -Ss
    ulimit -Hs

11.You may get different values in the above command.
     So, you need to manually assign the values for limits 
     in configuration file as shown below.

     vi /etc/security/limits.conf

    oracle              soft    nproc   16384
    oracle              hard    nproc   16384
    oracle              soft    nofile  4096
    oracle              hard    nofile  65536
    oracle              soft    stack   10240
12.Next, edit the below file to set the limit for all users.
     # Change this
       *          soft    nproc    1024
     # To this
     * - nproc 16384 
Save and exit the vi editor using wq!



Wednesday 7 March 2018

Issue Audit Messages Task Job Throws Warning IAM-0050001 java.lang.Exception: Audit handler failed

Issue Audit Messages Task Job Throws Warning IAM-0050001 java.lang.Exception: Audit handler failed
Error:-

oracle.iam.platform.async.TaskExecutionException: java.lang.Exception: Audit handler failed at com.thortech.xl.audit.engine.jms.XLAuditMessage.execute(XLAuditMessage.java:59) at
oracle.iam.platform.async.impl.TaskExecutor$1.processWithoutResult(TaskExecutor.java:125)        at oracle.iam.platform.tx.OIMTransactionCallbackWithoutResult.process(OIMTransactionCallbackWithoutResult.java:9)at oracle.iam.platform.tx.OIMTransactionCallback.doInTransaction(OIMTransactionCallback.java:13)at oracle.iam.platform.tx.OIMTransactionCallback.doInTransaction(OIMTransactionCallback.java:6)       at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)at oracle.iam.platform.tx.OIMTransactionManager.execute(OIMTransactionManager.java:22) at oracle.iam.platform.async.impl.TaskExecutor.executeManagedTask(TaskExecutor.java:12)at oracle.iam.platform.async.impl.TaskExecutor.execute(TaskExecutor.java:67) at oracle.iam.platform.async.messaging.MessageReceiver.onMessage(MessageReceiver.java:68)at sun.reflect.GeneratedMethodAccessor1059.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  at java.lang.reflect.Method.invoke(Method.java:606)at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at com.sun.proxy.$Proxy446.onMessage(Unknown Source)at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:583)  at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:486) at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:388)at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4817)at weblogic.jms.client.JMSSession.execute(JMSSession.java:4491)at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3945)at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5337)at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:550)at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.lang.Exception: Audit handler failed
        ... 34 more

Solution:-

Issue audit messages scheduled task should do the "cleanup" job.
Its recommendation is to schedule "Issue Audit Messages Task" to run every five minutes, with Max Records set to 200. Again, this can be tuned per ones requirements.

1. Logon to OIM sysadmin console
2. Click on Schedulers
3. Search for Issue Audit Messages Task scheduler
4. In Job Information-->Retries change value to 5.
5. Click on Apply
6. Bring down all managed servers node by node
7. Take backup and delete tmp,cache and data folder
8. Restart servers error should go away