Use Grid Infrastructure to Manage Oracle Databases and Other Resources

1. Documentation in Tahiti -> Masters Book List -> Database Installation Guide for Linux -> 3 Oracle Grid Infrastructure

Documentation Tahiti -> Masters Book List -> Administrator’s Guide -> 4 Configuring Automatic Restart of an Oracle Database

2. “Oracle Grid Infrastructure” consists of the ASM software, Oracle Restart (in Single-Instance) and Clusterware (in clusters).
We have done exercises on ASM and Clusterware in the sections of “Grid Infrastructure and ASM” and “Real Application Clusters”. In this objective we will focus on “Oracle Restart”. WITHOUT install ASM Grid Infrastucture. Add the database to Grid and then will manage resources doing some tests.

3. IMPORTANT -> Before you do any exercise do a backup of the COM virtual machine.

Click “VM” ->
-> Click “Power” ->
-> Click “Power Off” ->
-> Copy the contents of the VM to another location (eg .: C: Virtual Machines OCM => C: Virtual Machines Backups OCM)

4. Before starting the VM verify that we have enough memory to install Grid Infrastructure (2.5GB). It is the recommended minimum requirement for a facility’s Grid Database.

Click “VM” ->
-> Click “Settings” ->
-> “Memory For This virtual machine” = 2560 ->
-> Click “Ok” ->
-> Click “Power on This virtual machine”

5. Copy the software “Grid Infrastructure” ( in the CMO Virtual Machine with WinSCP or FileZilla. -> / u01 / stage

6. Unzip the software to the oracle user and delete archives.
su – oracle
cd / u01 / stage

7. As we only have one user for the grid, we give all the privileges to the same user (oracle).

# Assign the oracle user to all ASM management GROUPS
/usr/sbin/usermod -G dba, asmdba, asmoper, asmadmin oracle

8. Activate the NTP daemon slewing mode. This step is necessary to prevent errors in the software installation.

Edit the file /etc/sysconfig/ntpd as root and change the line:
OPTIONS = “- u ntp: ntp -p /var/run/”
# For this one:
OPTIONS = “- x -u ntp: ntp -p /var/run/”

# Save and restart the NTP daemon
service ntpd restart

9. We create the location for the software Grid and give the correct permissions.
mkdir -p /u01/app/11.2.0/grid
chown -R oracle: oinstall /u01/app/11.2.0/grid
chmod -R 755 /u01/app/11.2.0/grid

10. We launch the installation wizard Grid Infrastructure (runInstaller).

# Run the runInstaller command with the oracle user
cd /u01/stage/grid/

11. We install only “Grid Infrastructure” software.

Select “Install Grid Infrastructure Software Only” ->
-> Click “Next” ->
-> In “Selected Languages” we’ll “Inglés” ->
-> Click “Next” ->
-> Leave the default OS groups (asmdba, asmoper and asmadmin) ->
-> Click “Next” ->
-> Oracle Database = “/ u01 / app / oracle” ->
-> Software Location = “/u01/app/11.2.0/grid” ->
-> Click “Finish”

12. When the installation finishes, asks us to execute the following script “/u01/app/11.2.0/grid/” as root.

# Open in as root and run the script
# Accept the default directories are asking us [ENTER] and indicate that overwrite [Y]

13. IMPORTANT -> After the execution of “/u01/app/11.2.0/grid/” command indicates the steps to configure Grid Infrastructure on a Stand-Alone Installation and record the ORACLE_HOME. This is necessary for correct installation of Oracle Restart.

# Run the following command as root to configure Grid Infrastructure
/u01/app/11.2.0/grid/perl/bin/perl -I /u01/app/11.2.0/grid/perl/lib -I /u01/app/11.2.0/grid/crs/install/u01/app/11.2.0/grid/crs/install/

# Recorded the ORACLE_HOME GI
su – oracle
/u01/app/11.2.0/grid/oui/bin/runInstaller -updateNodeList -silent -local CRS = true ORACLE_HOME = /u01/app/11.2.0/grid

14. Close the installation wizard GI.

Click “Ok” ->
-> Click “Close”

15. We recorded the resources we have in the machine within GI.

# Recorded DB and LISTENER (oracle user)
# By default, when the machine boots instance OCM is lifted
/u01/app/11.2.0/grid/bin/srvctl add database -d -o OCM /u01/app/oracle/product/11.2.0/dbhome_1
/u01/app/11.2.0/grid/bin/srvctl add -l LISTENER listener, or /u01/app/oracle/product/11.2.0/dbhome_1

# We raise resources through the GI
/u01/app/11.2.0/grid/bin/srvctl start -l listener LISTENER
/u01/app/11.2.0/grid/bin/srvctl start database -d OCM

16. We do various tests on the GI.

# Validate that you have added resources and BD correctly LISTENER
# We have to see ONLINE (TARGET STATE) the following resources: "ora.LISTENER.lsnr" and "ora.ocm.db"
/u01/app/11.2.0/grid/bin/crsctl stat res -t

# Validate that the GI lift automatically after the restart (autostart is enabled)
/u01/app/11.2.0/grid/bin/crsctl config has

17. We can also add services to the DB through GI. If not, the GI will create for us.

# Create a basic service test and got GI
# We can see the options available in the documentation for Oacle srvctl Restart
/u01/app/11.2.0/grid/bin/srvctl add service -d -s CMO SERVTEST
/u01/app/11.2.0/grid/bin/srvctl start service -d -s CMO SERVTEST

# Check the service status from GI
/u01/app/11.2.0/grid/bin/crsctl stat res -t

# Check that register with LISTENER (hopefully one minute)
lsnrctl services LISTENER

# We stopped the service and eliminate SERVTEST
/u01/app/11.2.0/grid/bin/srvctl stop service -d -s CMO SERVTEST
/u01/app/11.2.0/grid/bin/srvctl remove CMO -s -d service SERVTEST

18. delete the GI software installation
rm rf / u01 / stage / grid

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.