DBA Hub

📋Steps in this guide1/1

ASM Installation

in this lecture we are going to learn asm installation

oracle configurationintermediate
by OracleDba
11 views
1

Overview

ASM Installation Prerequisites:- Step 1: Set up Oracle Database Server on VMware Workstation using( OEL) Linux 7.6 OS Platform? Add below OS groups Add asmdba as secondary group to Oracle user Create Grid User Change the password for Oracle and Grid user Create the Directories for Oracle Database installation Create the Directories for Oracle Grid installation Configure Oracle ASM Let us configure Oracle ASM Load / initiate Oracle ASM Add 30 GB HDD to virtual machine which we will use to create 3 partitions of 10 GB each for our ASM disks. Open Virtual machine >> Settings >> Storage >> Controller: SATA >> Create new disk create 3 partitions of 10 GB each for our ASM disks login as root user to format the  disk In the above output the /dev/sdb is not yet formatted. Let’s create 3 partitions on sdb Create separate ASM Disk for each partition To check asm disks Install Grid Software Edit Grid user Bash_Profile but take .bash_profile backup before editing it Paste below contents Save and close vi editor. Execute the bash profile and check the environment variables Copy the 19c grid software under grid home and unzip it Oracle Database 19c Grid Infrastructure (19.3) for Linux x86-64 https://www.oracle.com/ae/database/technologies/oracle19c-linux-downloads.html Setup xming and Start the gridSetup.sh as a grid user which will install grid software Follow below screens to perform the grid software installation - Change Disk group name as CRS - Select External - Click on Change Discovery Path - Give Disk Discovery Path as /dev/oracleasm/disks - Click on OK Select /dev/oracleasm/disks/CRS1 >> Next Select Use Same Password for these Accounts >> Specify password >> confirm password >> Next. Click on Yes Click Next >> Next Click Next >> Next >> Next Click on fix and check again Install the missing package To install package (under root user): The grid installer allows you to only create one diskgroup (CRS). We need to start the asmca utility in order to create DATA and FRA diskgroup which are required for database installation. Click on Create - Give Disk Group Name as DATA - Select External(None) - Select /dev/oracleasm/disks/DATA1 - Click on OK Click on Create - Give Disk Group Name as FRA - Select External(None) - Select /dev/oracleasm/disks/FRA1 - Click on OK Install Oracle Software Login as oracle Edit Oracle user bash profile and put below Download https://www.oracle.com/ae/database/technologies/oracle19c-windows-downloads.html Unzip the Oracle software Start the runinstaller Uncheck the i wish to receive security updates via my oracle support Select install database software only >> Next >> Next >> Next >> Next >> Next DBCA Create Database on ASM We can now go ahead and create database on ASM with DBCA. Start DBCA >> Create a Database >> Advance Configuration - Give Global Database name as prod - Uncheck Create as container database - Click on Next Select Use following for the database storage attributes >> Browse - Select DATA >> Click on OK - Click on Next Select specific fast recovery area >> Browse - Select FRA >>  Click on OK - Change Fast Recovery Area Size  >> Next Click Next >> Next >> Next Uncheck Register with Enterprise Manager(EM) database express Select Use the same administrative password for all accounts >> Password >> Confirm Password Select Create the database >> Next >> Finish Done! For confirmation purpose, connect to database as Oracle user and issue below queries We have successfully create Oracle Database on ASM! Hope It Helps !!

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
yum -y install -y oracle-database-preinstall-19c

yum -y install oracleasm*

yum -y install kmod-oracleasm*

groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin

usermod -a -G asmdba oracle

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

passwd oracle

passwd grid

mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/product/19.3.0/db_home
chown -R oracle:oinstall /u01/app/oracle

mkdir -p /u01/app/grid/product/19.3.0/grid_home
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01

oracleasm configure -i

fdisk -l

fdisk /dev/sdb

n                        --> to create new partition
<enter>
<enter>
<enter>
+10G

n
<enter>
<enter>
<enter>
+10G

n
<enter>
<enter>
<enter>
<enter>

w                        --> to save partition table

oracleasm createdisk CRS1 /dev/sdb1
oracleasm createdisk DATA1 /dev/sdb2
oracleasm createdisk FRA1 /dev/sdb3

oracleasm listdisks

ls -lrt /dev/oracleasm/disks

su - grid

cp .bash_profile .bash_profile.orig

vi .bash_profile

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/grid/product/19.3.0/grid_home

export ORACLE_SID=+ASM

export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib

PATH=$PATH:$HOME/.local/bin:$ORACLE_HOME/bin

export PATH

umask 022

source .bash_profile

env|grep ORA

cd $ORACLE_HOME
unzip LINUX.X64_193000_grid_home.zip

unzip LINUX.X64_193000_grid_home.zip

cd /u01/app/grid/product/19.3.0/grid_home

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

[root@prim rpm]# pwd
/u01/app/grid/product/19.3.0/grid_home/cv/rpm
[root@prim rpm]# rpm -ivh cvuqdisk-1.0.10-1.rpm
Preparing...                          ################################# [100%]
Using default group oinstall to install package
Updating / installing...
   1:cvuqdisk-1.0.10-1                ################################# [100%]
[root@prim rpm]#

cd /u01/app/grid/product/19.3.0/grid_home/cv/rpm

rpm -ivh cvuqdisk-1.0.10-1.rpm

vi .bash_profile

vi .bash_profile

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

# User specific environment and startup programs

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/19.3.0/db_home

export ORACLE_SID=prim

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

PATH=$PATH:$HOME/.local/bin:$ORACLE_HOME/bin

export PATH

. .bash_profile

mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/product/19.3.0/db_home
chown -R oracle:oinstall /u01

cd /u01/app/oracle/product/19.3.0/db_home


Unzip LINUX.X64_193000_db_home.zip

cd database
./runinstaller

SQL> select name, open_mode from v$database;
SQL> select name from  v$datafile;
SQL> select name from  v$controlfile;

Comments (0)

Please to add comments

No comments yet. Be the first to comment!