Tuesday 15 December 2020

Installing Oracle 12cR2 Database on RHEL 7 in si

 In this blog, we will look at steps to install the Oracle 12cR2 Database silently on RHEL 7.


1. Create the response file under /tmp

vi /tmp/12cR2_response.rsp

Do not forget to replace ORACLE_HOSTNAME, ORACLE_HOME and ORACLE_BASE location in the below file
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0 oracle.install.option=INSTALL_DB_SWONLY ORACLE_HOSTNAME=proddb UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory SELECTED_LANGUAGES=en ORACLE_HOME=/u01/app/oracle/product/12.2.0.1 ORACLE_BASE=/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA_GROUP=dba oracle.install.db.OSOPER_GROUP=dba oracle.install.db.OSBACKUPDBA_GROUP=dba oracle.install.db.OSDGDBA_GROUP=dba oracle.install.db.OSKMDBA_GROUP=dba oracle.install.db.OSRACDBA_GROUP=dba SECURITY_UPDATES_VIA_MYORACLESUPPORT=false DECLINE_SECURITY_UPDATES=true oracle.installer.autoupdates.option=SKIP_UPDATES

2. Go to 12cR2 installation software location and fire the runInstaller in silent mode

./runInstaller -ignoreSysPrereqs -showProgress -silent -responseFile /tmp/12cR2_response.rsp




3. Edit the dbca.rsp file under database/response folder and then run the installer to install the database


dbca -ignorePreReqs -createDatabase -silent -responseFile ./dbca.rsp




4. netca -silent -responseFile ./netca.rsp

netca -silent -responseFile /u01/software/database/response/netca.rsp

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /u01/software/database/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control:
      /u01/app/oracle/product/12.2.0.1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0










Wednesday 2 December 2020

12.1.0 Grid Installation on Solaris 11.3 fails with ASM failed to start


Issue Description

 We faced one issue, while installing the GI 12.1.0.1.0 on Solaris 11.3 


ASM failed to start. Check /u01/app/grid/cfgtoollogs/asmca/asmca-201202PM061908.log for details.


2020/12/02 18:19:17 CLSRSC-184: Configuration of ASM failed


2020/12/02 18:19:17 CLSRSC-258: Failed to configure and start ASM


Died at /u01/app/12.1.0/grid_1/crs/install/crsinstall.pm line 1976.

The command '/u01/app/12.1.0/grid_1/perl/bin/perl -I/u01/app/12.1.0/grid_1/perl/lib -I/u01/app/12.1.0/grid_1/crs/install /u01/app/12.1.0/grid_1/crs/install/rootcrs.pl ' execution failed


This error is coming during root.sh execution on primary node. After checking the asmca logs, the error seen is as below:


==========================

[main] [ 2020-12-02 17:00:49.575 AST ] [UsmcaLogger.logException:156] SEVERE:method oracle.sysman.assistants.usmca.backend.USMInstance:configureLocalASM
[main] [ 2020-12-02 17:00:49.575 AST ] [UsmcaLogger.logException:157] ORA-27122: unable to protect memory

[main] [ 2020-12-02 17:00:49.576 AST ] [UsmcaLogger.logException:158] oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-27122: unable to protect memory

oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1713)
oracle.sysman.assistants.util.sqlEngine.SQLEngine.startup(SQLEngine.java:2146)
oracle.sysman.assistants.usmca.backend.USMInstance.configureLocalASM(USMInstance.java:3155)
oracle.sysman.assistants.usmca.service.UsmcaService.configureLocalASM(UsmcaService.java:1012)
oracle.sysman.assistants.usmca.model.UsmcaModel.performConfigureLocalASM(UsmcaModel.java:951)
oracle.sysman.assistants.usmca.model.UsmcaModel.performOperation(UsmcaModel.java:814)
oracle.sysman.assistants.usmca.Usmca.execute(Usmca.java:213)
oracle.sysman.assistants.usmca.Usmca.main(Usmca.java:503)
[main] [ 2020-12-02 17:00:49.576 AST ] [UsmcaLogger.logInfo:128] ASM failed to start. Check /u01/app/grid/cfgtoollogs/asmca/asmca-201202PM050039.log for details.
[main] [ 2020-12-02 17:00:49.577 AST ] [UsmcaLogger.logInfo:128] Instance running false
[main] [ 2020-12-02 17:00:49.577 AST ] [UsmcaLogger.logInfo:128] ASM failed to start. Check /u01/app/grid/cfgtoollogs/asmca/asmca-201202PM050039.log for details.

==================================================


Cause of the Error:

This is due to the known bug on 12.1.0 as per the Oracle Note. 2118379.1

The issue is addressed in unpublished
Bug 22500861 - CONSOLIDATE TXN FOR LARGE PAGESIZE SUPPORT OSM

The bug is fixed in 12.1.0.2.

As per bug report, the database start up failure was due to OSM (Optimized Shared Memory) segment. There were some transactions missing in 12.1.0.1 with respect to Solaris OS which leads to this failure. It will affect Solaris 11 latest updates.


SOLUTION

To solve the issue, use any of below alternatives:

  • Apply patch set 12.1.0.2

    - OR -

  • Apply interim patch 22500861, if available for your platform and Oracle version.

Cancel the GI installer, then apply the patch on both nodes
after the patches are successfully installed, perform the below steps to clean up and restart the configuration


1. cd $GI_HOME/crs/install/

./rootcrs.pl -deconfig -force 

Run this clean up on both nodes

2. Re-run the Configuration from vnc

cd /u01/app/12.1.0/grid_1/crs/config

./config.sh 


This will successfully complete the GI Installation 

Oracle 12c Grid Installation high level steps

Oracle 12c Grid and RAC Database Installation on Solaris 11.3



- set UDP and TCP kernel parameters
/usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 9000
/usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65500
/usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000
/usr/sbin/ndd -set /dev/udp udp_largest_anon_port 65500

– add groups

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/groupadd asmadmin
/usr/sbin/groupadd asmdba
/usr/sbin/groupadd asmoper

– add users

/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper -d /export/home/grid -m grid
/usr/sbin/useradd -g oinstall -G dba,asmdba -d /export/home/oracle12 -m oracle

– change user passwords

passwd oracle
passwd grid

– add project

projadd group.oinstall

projmod -sK "project.max-shm-memory=(privileged,50G,deny)" group.oinstall
projmod -sK "process.max-sem-nsems=(priv,4096,deny)" group.oinstall
projmod -sK "project.max-shm-ids=(priv,1024,deny)" group.oinstall
projmod -sK "project.max-sem-ids=(priv,1024,deny)" group.oinstall

– check projects

projects -l

– create directories

mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory

mkdir -p /u01/app/12.1.0/grid
chown -R grid:oinstall /u01/app/12.1.0/grid
chmod -R 775 /u01/app/12.1.0/grid

mkdir -p /u01/app/oracle
mkdir /u01/app/oracle/cfgtoollogs
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle

mkdir -p /u01/app/oracle/product/12.1.0/dbhome
chown -R oracle:oinstall /u01/app/oracle/product/12.1.0/dbhome
chmod -R 775 /u01/app/oracle/product/12.1.0/dbhome


Format Disks

********************************************************

 

– to list all disks

root@solaris11:~# echo | format



– Change owner of the disks

chown grid:oinstall /dev/rdsk/c1d4s*
chown grid:oinstall /dev/rdsk/c1d5s*
chown grid:oinstall /dev/rdsk/c1d6s*
chown grid:oinstall /dev/rdsk/c1d7s*
chown grid:oinstall /dev/rdsk/c1d8s*
chown grid:oinstall /dev/rdsk/c1d9s*
chown grid:oinstall /dev/rdsk/c1d10s*
chown grid:oinstall /dev/rdsk/c1d11s*
chown grid:oinstall /dev/rdsk/c1d12s*
chown grid:oinstall /dev/rdsk/c1d13s*


– Give permission to the disks

chown 660 /dev/rdsk/c1d4s*
chown 660 /dev/rdsk/c1d5s*
chown 660 /dev/rdsk/c1d6s*
chown 660 /dev/rdsk/c1d7s*
chown 660 /dev/rdsk/c1d8s*
chown 660 /dev/rdsk/c1d9s*
chown 660 /dev/rdsk/c1d10s*
chown 660 /dev/rdsk/c1d11s*
chown 660 /dev/rdsk/c1d12s*
chown 660 /dev/rdsk/c1d13s*
Go to the Grid Software and 
export DISPLAY=:1
./runInstaller
Complete the remaining steps through the GUI tool and this will install the GI 

XX_XXXXXXX is not a valid responsibility for the current user. Please contact your System Administrator.

  XX_XXXXXXX is not a valid responsibility for the current user. Please contact your System Administrator. Issue : When user logs into EBS, ...