Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Installing Oracle 19c DB With Asm

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

INSTALLING ORACLE 19C DB WITH ASM ON ORACLE

LINUX 7 USING ORACLE-VMWARE

LAPTOP SEPCIFICATION:
Device name DESKTOP-UDFCCC7
Processor Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz 2.19 GHz
Installed RAM 8.00 GB
System type 64-bit operating system, x64-based processor
Edition Windows 10 Home Single Language
Version 22H2
Installed on 12-01-2024
OS build 19045.5011
Experience Windows Feature Experience Pack 1000.19060.1000.0

ORACLE VM WARE CONFIGURATION:


 BASE MEMORY: 4GB
 POCESSOR COUNT: 2
 SWAP MEMORY :6GB
 STORAGE: THREE VIRTUAL DISKS ARE CREATED

(NOTE: If you were creating Storage disks using LVM without automatic partitioning, Check
SWAP was included, if not after Linux installation add SWAP memory to avoid difficulties in
GRID, ASM and 19 c DB installations)

 NETWORK: THREE NETWORK ADAPTER HAVE CREATED, BUT ONE IS ENOUGH


(Note: Make sure those IP are static, to avoid certain confusion while logging in putty and
also register the hostname while configuring the IP as well

INSTALLING ORACLE 19C GRID AND ASM:

1. Before starting installation keep your Linux updated


yum –y update
yum clean all
2. Prerequisites
yum -y install oracle-database-preinstall-19c.x86_64
yum -y install wget oracleasm kmod-oracleasm oracleasm-support
3. Create required groups and the grid user
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin

useradd -u 54322 -g oinstall -G dba,asmdba,asmoper,asmadmin grid

usermod -u 500 -g oinstall -G

dba,oper,asmdba,asmoper,asmadmin,kmdba,dgdba,backupdba,racdba oracle
4. Create directories for grid home, oracle home and oracle inventory

Note: Here I’m going to create grid_home & /db_home in / partation


mkdir -p /u01/app/grid/19c/grid_home
mkdir -p /u01/app/oracle/19c/db_home
mkdir -p /u01/app/oraInventory
5. Give ownership of each directory to respective users
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/grid
chown -R grid:oinstall /u01/app/oraInventory
6. ASM disks configuration and initialise it
oracleasm init
oracleasm configure -i

7. Creating disk partitions:


Fdsik –l /dev/sdc
Fdisk –l /dev/sdb

[Note : Here I have created two separate Volume Device each of around 40 G and it has segregated
has 6 primary disks partition for Creating oracle asm Diskgroups under /dev/sdb* & /dev/sdc*
8. Switch to grid user and edit the .bash_profile and .bashrc
Su –grid
vi .bash_profile

vi .bashrc

NOTE: Execute the bash_profile once to make environmental variables changed


9. Download Oracle 19c grid and copy the 19c software file to ORACLE_HOME location
and unzip. Start the run installer to perform installation

10. Now set the appropriate Kernel parameters

# Shared memory settings


kernel.shmmax = 2147483648 # Maximum size of a single shared memory segment (2 GB)
kernel.shmall = 524288 # Total amount of shared memory (2 GB / 4096 bytes)
kernel.sem = 250 32000 100 256 # Semaphore settings
# File handle settings
fs.file-max = 6815744 # Maximum number of file handles
fs.aio-max-nr = 1048576 # Maximum number of asynchronous I/O requests
# Network settings
net.core.rmem_max = 16777216 # Maximum receive buffer size (16 MB)
net.core.wmem_max = 16777216 # Maximum send buffer size (16 MB)
# Memory management
vm.dirty_background_ratio = 10 # Percentage of dirty pages to trigger writeback
vm.dirty_ratio = 20 # Percentage of total memory that can be filled with dirty pages
vm.swappiness = 10 # Controls the balance between swapping and caching
11. Provide required Permission with its respective owner for the Disks Partitions

sudo chown grid:oinstall /dev/sdb1


sudo chown grid:oinstall /dev/sdb2
sudo chown grid:oinstall /dev/sdb3
sudo chown grid:oinstall /dev/sdb4
sudo chown grid:oinstall /dev/sdc1
sudo chown grid:oinstall /dev/sdc2
sudo chown grid:oinstall /dev/sdc

sudo chmod 660 /dev/sdb1


sudo chmod 660 /dev/sdb2
sudo chmod 660 /dev/sdb3
sudo chmod 660 /dev/sdb4
sudo chmod 660 /dev/sdc1
sudo chmod 660 /dev/sdc2

To make those Permissions and changes permanent use the below steps
sudo vi /etc/udev/rules.d/99-oracleasm.rules
KERNEL=="sdc[1-2]", OWNER="grid", GROUP="oinstall", MODE="0660"
KERNEL=="sdb[1-4]", OWNER="grid", GROUP="oinstall", MODE="0660"

sudo udevadm control --reload-rules


sudo udevadm trigger
12. Once the above steps are finished launch ./gridSetup.sh script from grid user
[grid@racdb1 ~]$ cat grid.rsp | grep -v "#"
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0

INVENTORY_LOCATION=/u01/app/oraInventory
oracle.install.option=HA_CONFIG
ORACLE_BASE=/u01/app/grid
oracle.install.asm.OSDBA=oinstall
oracle.install.asm.OSOPER=oinstall
oracle.install.asm.OSASM=oinstall
oracle.install.crs.config.scanType=LOCAL_SCAN
oracle.install.crs.config.ClusterConfiguration=STANDALONE
oracle.install.crs.config.configureAsExtendedCluster=false
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
oracle.install.crs.config.gpnp.gnsOption=CREATE_NEW_GNS
oracle.install.crs.configureGIMR=false
oracle.install.asm.configureGIMRDataDG=false
oracle.install.crs.config.useIPMI=false
oracle.install.asm.diskGroup.name=ORADATA,ORAFLASH,RDOG
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.AUSize=4
oracle.install.asm.diskGroup.disksWithFailureGroupNames=/dev/sdb1,,/dev/sdb2,,/dev/sdb3,,/dev/sd
b4,,/dev/sdc1,,/dev/sdc2
oracle.install.asm.diskGroup.disks=/dev/sdb1,/dev/sdb2,/dev/sdb3,/dev/sdb4
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/sdb*,,/dev/sdc*
oracle.install.asm.gimrDG.AUSize=1
oracle.install.asm.configureAFD=false
oracle.install.crs.configureRHPS=false
oracle.install.crs.config.ignoreDownNodes=false
oracle.install.config.managementOption=NONE
oracle.install.config.omsPort=0
oracle.install.crs.rootconfig.executeRootScript=true
oracle.install.crs.rootconfig.configMethod=ROOT
13. Once the Installation are completed , then Bring up Listener services ,Cluster ware
services and ASM servicers
Lsnrctl start
Lsnrctl status

Crsctl check has


Crsctl start has

Sqlplus / as sysasm
Startup
Shutdown immediate
(OR)
Srvctl start asm
Srvctl stop asm -f
14. Using ASMCA create multiple disk groups has ORADATA, ORAFLASH and REDOG
Note: Redundancy External
15. Now shutdown the ASM instance and create a pfile and startup using that :
[grid@racdb1 pfile]$ cat /u01/app/grid/admin/+ASM/pfile/init_+ASM.ora
#ASM specific parameters
instance_type = ASM
asm_diskstring = '/dev/sdc*', '/dev/sdb*' # Adjust to match your disk paths
asm_diskgroups = 'ORADATA', 'ORAFLASH', 'REDOG' # Replace with your actual disk group names
memory_target = 1G
processes = 150
diagnostic_dest = '<ORACLE_BASE>'
Then Create a spfile from Pfile:
create spfile='/u01/app/grid/19c/grid_home/dbs/spfileASM.ora' from
pfile='/u01/app/grid/admin/+ASM/pfile/init_+ASM.ora'
16. Install Oracle 19c Database
Switch to Oracle user
su - oracle
vi .bash_profile

Vi .bashrc

NOTE: Once the environment are set , close the terminal and again check echo $ORACLE_SID to see
the changes
17.Copy the Db_home 19c file to oracle_home and unzip the file

18. Use Oracel Universal installer to install the 19c DB software


./runInstaller
NOTE: If you are choosing Server class, it will have some good features based on you requirements
you can select required options for your DB
19. Bring up the DB using P-file

db_block_size=8192
open_cursors=300
db_name="rac1"
db_create_file_dest="+ORADATA"
db_recovery_file_dest="+ORADATA"
db_recovery_file_dest_size=8256m
compatible=19.0.0
diagnostic_dest=/u01/app/oracle
nls_language="AMERICAN"
nls_territory="AMERICA"
local_listener=LISTENER_RAC1
processes=300
sga_target=1455m
audit_file_dest="/u01/app/oracle/admin/rac1/adump"
audit_trail=db
remote_login_passwordfile=EXCLUSIVE
dispatchers="(PROTOCOL=TCP) (SERVICE=rac1XDB)"
pga_aggregate_target=485m
undo_tablespace=UNDOTBS1
control_files=("+ORADATA/RAC1/CONTROLFILE/current.261.1182352465",
"+ORADATA/RAC1/CONTROLFILE/current.260.1182352467")
20. Create spfile from Pfile

create spfile='+ORADATA/RAC1/PARAMETERFILE/spfilerac1.ora' from


pfile='/u01/app/oracle/admin/rac1/pfile/init.ora.914202416046';

Overview of Installation Steps

1. System Preparation: Update the Linux system and install necessary prerequisite
packages.
2. User and Group Setup: Create required OS groups (asmdba, asmoper, asmadmin)
and users (grid, oracle) with appropriate permissions.
3. Directory Structure: Create directories for Grid home, Oracle home, and Oracle
inventory.
4. Disk Configuration: Initialize ASM, create and configure ASM disks, and set
ownership and permissions for disk partitions.
5. Environment Configuration: Edit .bash_profile and .bashrc for the grid user
and set necessary kernel parameters for Oracle.
6. Grid Installation: Download Oracle 19c Grid software, prepare a response file, and
run the Grid installation.
7. Post-Installation Configuration: Start Oracle Listener and Cluster services, and use
ASMCA to create disk groups.
8. ASM Configuration: Create a parameter file for the ASM instance, and create a
spfile from the pfile.
9. Database Installation: Switch to the Oracle user, set environment variables, copy
and unzip the Oracle DB files, and run the Oracle Universal Installer.
10. Database Configuration: Create a pfile with database parameters, then create a spfile
from that pfile, and start the database.

This process encompasses both the setup of the Oracle Grid Infrastructure with ASM and the
installation of the Oracle 19c Database, ensuring proper configuration for performance and
management. If you need more details on any specific step, let me know!

You might also like