Infoscale Enterprise - Vse+ Training Clustering Databases

You might also like

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

InfoScale Enterprise – VSE+ Training

Clustering Databases
VCS Database Agents

2 InfoScale Availability VSE+ Training


Agents for managing databases

Database agents

Not all agents are supported on all platforms.

You can also manage some databases using the Application


You canagent
also manage some databases
or customized using the Application agent or customized agents.
agents.

3 InfoScale Availability VSE+ Training


Database agent functions

• Start a specified database instance.

• Stop the specified instance.

• Monitor the instance.


• Clean up after a fault to enable
failover and prevent possible
concurrency violations.

Most database agents have multilevel monitoring.


• Basic-level monitoring may check the process table for applicable database processes.
• Detail or second-level monitoring may write to a test table in the specified database.

4 InfoScale Availability VSE+ Training


Second-level monitoring

Information required to access and write to a table

• A database user account with update privileges

• The password for the database user account

• The name of the database table

• The name of the SQL script used to write to the table

5 InfoScale Availability VSE+ Training


Monitoring listener processes
• Some databases have listeners built-in and do not require additional VCS agents
for monitoring.
• The Netlsnr agent has two-level monitoring for the Oracle listener:
– Basic: Scans the process table for the tnslsnr process Data
– Detail: Uses lsnrctl to test the listener
Oracle
server

Listener
Net8
ONS
User Protocol Server

6 InfoScale Availability VSE+ Training


Database Preparation

7 InfoScale Availability VSE+ Training


Verifying software compatibility
Use the latest database agent from SORT available for the VCS version in use.

8 InfoScale Availability VSE+ Training


Verifying software compatibility
• Use the latest database agent available for the VCS version in use.
• Check agent guides to verify that the database version is supported.
• Examples:

Oracle on Solaris DB2 on AIX and Linux

DB2 agent 7.x


Oracle agent 7.x:
• VCS 7.x
• VCS 7.x
• AIX 6.1 , 7.1
• Solaris SPARC 10, 11 ( 64-bit)
• RHEL 6, SLES 11 & 12, OEL 6 & 7
• Oracle 11g R2, 12c
• DB2 ESE 9.5, 9.7, 10.1, 10.5
9 InfoScale Availability VSE+ Training
Database program (binary) files

Comparing binary file locations

Local disk Shared storage


• Provides redundancy • Simplifies configuration when
• Requires the database to be there are many systems that
installed and configured can run the database
identically on each system • Requires all systems to have
the same mount point
directory for the database
home directory

10 InfoScale Availability VSE+ Training


Data files

Comparing shared storage objects

File system
• File systems must be located on shared disks.
• Create the same file system mount point on each system in the cluster.

Raw volume

• Set the permissions for the volumes to be owned permanently by the database:
vxedit –g diskgroup set group=dba user=oracle mode=660
volume
• You cannot change permission only in UNIX. VxVM sets volume permissions upon import.

11 InfoScale Availability VSE+ Training


Database-related system files

Database-related system files must be consistent on all systems that can run the
database:
• Database user accounts
• Passwords for database user accounts
• Database group entries
• Listener entries
• Database shared memory settings
• The database service group (virtual) IP address
See the product documentation for the database software for details about system file configuration.

12 InfoScale Availability VSE+ Training


Network configuration
For listener service failover:
• Include at least one IP resource in the service group for the database.
• Set the host name for this virtual IP address for the host field in the listener configuration file.

LISTENER= listener.ora
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=hr_ora)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
. . .
IP
. . .
10.10.21.54 hr_ora /etc/hosts
. . . 10.10.21.54

13 InfoScale Availability VSE+ Training


Database Agent For Oracle

14 InfoScale Availability VSE+ Training


Installing database agents

Database agents:
• Are automatically installed on all cluster systems if you select recommended or all
package sets
• Are included in the VRTSvcsea package
• Must be installed on all database failover target systems
• Can be installed manually from the software distribution using operating system
utilities
Note: Agent-specific types file must be added to main.cf if you install agents manually

15 InfoScale Availability VSE+ Training


High availability database configuration overview

Y Binaries on local storage


Prepare OS

Install database sw More


systems?
Configure database N
Add service group

Test database
Add/test resources
Stop resources
Test service group

16 InfoScale Availability VSE+ Training


Oracle service group configuration example

hr_orasg
hr_oracle hr_oralistener

hr_oraip

cdb1_oracle hr_oranic

hr_oraarchivemnt hr_oraredomnt hr_oradatamnt

hr_oraarchivevol hr_oraredovol hr_oradatavol

hr_oradg

17 InfoScale Availability VSE+ Training


IMF monitoring for Oracle resources

Type Attributes
IMF
Mode Default is 3, online and offline monitoring
MonitorFreq Default is 5, runs monitor entry point every five
minutes
RegisterRetryLimit Default is 3
IMFRegList Home, Owner, Sid, MonitorOption
LevelTwoMonitorFreq Default is 0

18 InfoScale Availability VSE+ Training


Configuring Oracle second-level monitoring
Oracle hr_oracle( main.cf
Sid = HRcdb1
Owner = oracle
Home = "/hr_ora”
PDBName = HR
Pfile = "/hr_ora/dbs/initHR.ora"

Enable EnvFile = "/hr_ora/.ora_envfile" User defined in HR


LevelTwoMonitorFreq = 1
database with update
User = "scott" privileges for testtable
Pword = "lgLimHmmKum"
Table = "testtable"
MonScript = "/opt/VRTSagents/ha/bin/Oracle/SqlTest.pl"

The table created in The executable script


HR database before containing SQL write
enabling the VCS resource statements

19 InfoScale Availability VSE+ Training


Other example Oracle configurations

Netlsnr Netlsnr

Oracle IP
Oracle IP

Mount Mount NIC


(binaries) (data)
Mount NIC

Mount
DiskGroup
Volume Volume
(logs) (data)

DiskGroup DiskGroup

20 InfoScale Availability VSE+ Training


Additional Oracle Agent Functions

21 InfoScale Availability VSE+ Training


Other Oracle agent functions

Action Info

• Run virtual fire drills. Obtain static and dynamic


• Perform predefined information about the state
actions on a resource. of an online resource (such
as a database).
• Script common DBA
tasks.

See the VCS Agent for Oracle Installation and Configuration


✓ Guide for details about using the action and info entry points.

22 InfoScale Availability VSE+ Training


Running a virtual fire drill
Oracle actions:
• getid
• pfile.vfd
• home.vfd
• owner.vfd
• tnsadmin.vfd

havfd orasg –sys s1 -v

23 InfoScale Availability VSE+ Training


Keeping DB2 Highly Available
Non-MPP (Active/Passive) DB2 UDB in a VCS environment
DB2 installation with a non-MPP configuration

Shared disks
System A (database instances) System B

DB2 DB2
Instance Instance
online offline
Private network

DB2 DB2
binaries binaries

Public network

25 InfoScale Availability VSE+ Training


Non-MPP configuration service groups for DB2

db2udb1 Db2udb

Mount db2udb_mnt1
db2udb_ip1 IP

Volume db2udb_vol1
db2udb_nic1 NIC

DiskGroup db2udb_dg1

26 InfoScale Availability VSE+ Training


MPP (Active/Active) DB2 UDB in a VCS environment
DB2 installation with an MPP configuration

Shared disks
System A (database instances) System B

DB2 DB2
Partition 1 Partition 2
online offline
Private network

DB2 DB2
binaries binaries

Public network

27 InfoScale Availability VSE+ Training


MPP configuration service groups for DB2

Parallel CVM service group DB2 failover service group

CFSMount Db2udb
CVMVolDg

CFSfsckd IP
CVMCluster

NIC
CVMvxconfigd

28 InfoScale Availability VSE+ Training


How the DB2 agent supports intelligent resource monitoring

• With intelligent monitoring framework (IMF), VCS supports intelligent resource


monitoring in addition to poll-based monitoring.

• Poll-based monitoring polls the resources periodically whereas intelligent


monitoring performs asynchronous monitoring.

• You can enable or disable the intelligent resource monitoring functionality of the
VCS agents for DB2.

29 InfoScale Availability VSE+ Training


Keeping Sybase Highly Available
Sybase configuration in a VCS cluster
Sybase binaries and Sybase data on shared disks

Shared disks
System A (Sybase binaries & data) System B

Sybase Sybase
Node 1 Node 2
online offline
Private network

Public network

31 InfoScale Availability VSE+ Training


Sybase configuration in a VCS cluster
Sybase binaries on local disk and Sybase data on shared disks

Shared disks
System A (Sybase data) System B

Sybase Sybase
Node 1 Node 2
online offline
Private network

Sybase Sybase
binaries binaries

Public network

32 InfoScale Availability VSE+ Training


How the Sybase agent supports intelligent resource monitoring

• With intelligent monitoring framework (IMF), VCS supports intelligent resource


monitoring in addition to poll-based monitoring.

• Poll-based monitoring polls the resources periodically whereas intelligent


monitoring performs asynchronous monitoring.

• You can enable or disable the intelligent resource monitoring functionality of the
VCS agents for Sybase and SybaseBk.

33 InfoScale Availability VSE+ Training


Thank you!

Copyright © 2019 Veritas Technologies, LLC. All rights reserved. Veritas and the Veritas Logo are trademarks or registered trademarks of Veritas Technologies or its affiliates
in the U.S. and other countries. Other names may be trademarks of their respective owners.
This document is provided for informational purposes only and is not intended as advertising. All warranties relating to the information in this document, either express or
implied, are disclaimed to the maximum extent allowed by law. The information in this document is subject to change without notice.

You might also like