0% found this document useful (0 votes)
162 views

Best Practices For Oracle On HPUX: Sandy Gruver Senior Technical Consultant HP/Oracle Advanced Technology Center

Uploaded by

EricSaubignac
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views

Best Practices For Oracle On HPUX: Sandy Gruver Senior Technical Consultant HP/Oracle Advanced Technology Center

Uploaded by

EricSaubignac
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 108

Best Practices for

Oracle on HPUX

Sandy Gruver
Senior Technical Consultant
HP/Oracle Advanced Technology Center
[email protected] 

© 2004 Hewlett-Packard Development Company, L.P.


The information contained herein is subject to change without notice
Topics
• Installation setup for Oracle on HPUX
• Recommended Kernel parameter settings for Oracle
• Using WLM with Oracle and HPUX partitions
• File System recommendations
• Storage Layout Recommendations
• Backup and Recovery best practices
• Day to day Oracle DBA hints and best practices
• High Availability for Oracle on HPUX
• Monitoring your Oracle environment
• Support for Oracle on HPUX and Oracle information

December 8, 2021 2
Before Installing
Oracle on HPUX

December 8, 2021 3
Brief review
HPUX SysAdm tool - SAM

December 8, 2021 4
H/W and S/W requirements
Overall system requirements
• Operating System
− HPUX 11.0 and HPUX 11i.
− Oracle 9i onward is only available for 64 bit HPUX
• S/W requirements
− Any X server supported by the UNIX system
− Need to have ar, cc and ld under /usr/ccs/bin
− Need to have Java make installed
• Physical Memory
− Minimum 256 MB for 9i Server (as per release notes). Suggested to
have around 4 GB or more
• Swap Space
− Twice the amount of physical Memory or Minimum 400 MB
• Disk Space
− Approx 3 GB for Database S/W and additional space for seed database
etc.

December 8, 2021 5
H/W and S/W requirements
Patches are extremely important
• Install the necessary HP-UX patches
− Listed in the Oracle Installation Guide
− For patch bundles:
• http://www.software.hp.com/SUPPORT_PLUS
− For individual patches:
• http://itresourcecenter.hp.com
− To check on patches:
− $ /usr/sbin/swlist -l patch
− $ /usr/sbin/swlist -l patch patch_number
− $ /usr/sbin/swlist -l bundle
• Increase /tmp space to at least 2GB
• Modify Kernel parameters for Oracle

December 8, 2021 6
Enhancing performance of Oracle
enable Sched_Noage
As root, create the file /etc/privgroup
dba MLOCK (for asynch IO)
dba RTSCHED RTPRIO (for priority scheduling)
Issue the commands:
# /usr/sbin/setprivgrp -f /etc/privgroup
# /usr/sbin/getprivgrp dba
Set the HPUX_SCHED_NOAGE Oracle initialization
parameter
− On HP-UX 11.0, the range is 153 to 255
− On HP-UX 11i, the range is 178 to 255

December 8, 2021 7
Oracle Users and Groups
1. Create UNIX groups (oinstall, dba)
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba

2. Create a UNIX account (oracle) to own Oracle software


# /usr/sbin/useradd -g oinstall -G dba oracle

3. For Oracle10g: Create a Unix account (extjob) to own the


executable extjob
# /usr/sbin/useradd extjob
• After installing Oracle, make these changes to the extjob file
• # cd oracle_home/bin
• # mv extjob.nobody extjob
• # chown extjob extjob
• # chmod 4711 extjob
December 8, 2021 8
A Few Important Environment variables

• ORACLE_HOME
e.g. export ORACLE_HOME=/oracle/9i_64b

• ORACLE_SID
e.g. export ORACLE_SID=oratest

• PATH
e.g. export PATH=$ORACLE_HOME/bin:$PATH

• SHLIB_PATH/LD_LIBRARY_PATH
e.g.
export LD_LIBRARY_PATH=$ LD_LIBRARY_PATH:$ORACLE_HOME/lib64

December 8, 2021 9
File and Directory Setup tasks
• Set the home directory of user oracle to
− $ORACLE_OWNER $HOME directory*
• Set the default shell to /bin/sh for the Bourne shell
• In the .profile, set
− umask 022
− xhost +
• Check the Oracle Inventory information after installation
# more /var/opt/oracle/oraInst.loc
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall
* See simplified OFA later in presentation

December 8, 2021 10
Implementing Asynchronous I/O
NOTE: Done ONLY if using RAW (not fs) storage

1. Enter the following command as the root user:


# sam
2. Choose the Kernel Configuration area.
3. Choose the Drivers area.
4. Choose the asynchronous disk driver (asyncdsk).
5. Select Actions>Add Driver to Kernel.
6. Select List>Configurable Parameters.
7. Choose the MAX_ASYNC_PORTS parameter.
8. Select Action>Modify Configurable Parameter.
9. Specify a new value for the parameter, then choose OK
Set Oracle initialization parameter DISK_ASYNCH_IO to TRUE.

December 8, 2021 11
Implementing Asynchronous I/O

December 8, 2021 12
Recommended
Kernel parameter
settings for Oracle

December 8, 2021 13
HP-UX Kernel Settings for Oracle DBs
• Specified in the documentation for Oracle
• See “Oracle Database Installation Guide”
• To list all kernel parameters
$ /usr/sbin/kmtune –l |more
Or use SAM
• To check 32 or 64 bit HP-UX 11.x
$ /bin/getconf KERNEL_BITS
$ 64
• To check 32 or 64 bit Oracle software version
$ cd $ORACLE_HOME/bin
$ file oracle
$ oracle: ELF-64 executable object file - PA-RISC 2.0 (LP64)
December 8, 2021 14
Recommended Minimum
HP-UX Kernel Settings for Oracle DBs
File System buffer-Cache Parameters:
bufpages Pages of static buffer cache – older 0
parm
dbc_max_pct Max dynamic buffer cache between 3 and 10 % of
memory
dbc_min_pct Min dynamic buffer cache between 2 and 5% of
memory
Open or Locked Files Parameters:

maxfiles Soft limit for open files 1024


maxfiles_lim Hard limit for open files 1024 (default)
nfile Open files limit (15 * NPROC + 2048)
nflocks File lock limit (NPROC) (at least 4096)
ninode Max inodes in memory (8 * NPROC + 2048)
December 8, 2021 15
Recommended Minimum
HP-UX Kernel Settings for Oracle DBs
Parameters for Logical Volume Manager:
maxvgs Maximum volume groups Increase to the number of
on the system volume groups you would
like to have on the system
(maximum 256)
Parameters for Memory Paging and Variable Page Size:

maxswapchunks Max swap space on the 16384


system
swapmem_on Enable/disable pseudo-swap 1 (on)

swchunk Swap chunk size 4096 (up to 65536 for large


RAM)
vps_ceiling Max page size in Kbytes 64

December 8, 2021 16
Recommended Minimum
HP-UX Kernel Settings for Oracle DBs
Parameters for Process Management:
maxdsiz Max process data seg size 1073741824 bytes or
for 32bit procs (0x40000000)
maxdsiz_64bit Max process data seg size 2147483648 bytes or
for 64bit procs (0x80000000)
maxssiz Max process storage seg 134217728 bytes
size for 32bit procs
maxssiz_64bit Max process storage seg 1073741824 bytes or
size for 64bit procs (0x40000000)
maxtsize Max process text seg size 128MB
maxuprc Max # of procs/user ((NPROC*9)/10)
max_thread_proc Max threads/proc 256
nkthread Max kernel threads (((NPROC * 7) / 4) + 16)
nproc Max procs/system 4096
December 8, 2021 17
Recommended Minimum
HP-UX Kernel Settings for Oracle DBs
InterProcessCommunication Message Parameters:
msgmap Message map size (2+msgmni)
msgmni Max msg queues nproc
msgseg # segs in msg queue 32767
msgtql Total msgs on system nproc

InterProcessCommunication Semaphore Parameters:


semmap Free sem map size (semmni+2)
semmni Max sems/system 4096
semmns Max sems for users/sys (semmni*2)
semmnu Max undos/sem (nproc-4)
semvmx Max sem value 32767

December 8, 2021 18
Recommended Minimum
HP-UX Kernel Settings for Oracle DBs
InterProcessCommunication Shared Memory Parameters:
shmmax Max shared memory Large enough to hold the entire
segment SGA in one shared memory
segment
shmmni Max segments/system 512
shmseg Max segments/proc 120 per Oracle database

Miscellaneous Parameters:

max_async_ports Max ports to asynch max. no of shadow processes + no


driver/system of parallel query slaves (could go up
to nproc)
maxusers Max simultaneous set to number of concurrent Oracle
users/system DB users + 64

December 8, 2021 19
Updating Kernel Parameters
OR Use SAM
Edit /stand/vmunix
− Backup /stand/system
− Edit/modify /stand/system
− config /stand/system
? Check that it created
vmunix_test in local directory
− Backup /stand/vmunix
− mv /stand/vmunix_test
/stand/vmunix
− shutdown -r

December 8, 2021 20
Using WLM with
Oracle and HPUX
partitions

December 8, 2021 21
HP Virtual Server Environment:
server resource flexing for applications

Policy engine
provisions server resource pool
resources based on
SLOs and business security
priorities
for each
application.

Oracle Reporting
Apps

December 8, 2021 22
HP Partitioning Continuum
Clustered nodes Hard partitions Virtual partitions Resources partitions
nPar vPar PRM/pSets
hard 1 OS image

Based on CPUs or percentages


partition
OS image OS Application 1
with HW image with guaranteed
with SW compute
isolation
resources
isolation
OS Application 2
image with guaranteed
OS image with SW compute
with HW isolation resources
isolation

OS image OS
Application n
with HW image with guaranteed
with SW
isolation compute
isolation resources

HP-UX Workload Manager


Isolation Flexibility
Highest degree of separation Highest degree of dynamic capabilities
December 8, 2021 23
vPars logical overview

• multiple vPar1 vPar2 vPar3


applications,
instances or • individual “servers”
versions • different OS revs
• name space and Dept. A Dept. A Dept. B • each OS custom-tunable
App 1 App 1’ App 2
resource isolation • dynamic resource
allocations

HP-UX HP-UX HP-UX


Revision A Revision A Revision B
Patch Lvl 1 Patch Lvl 2 Patch Lvl 1
• creates illusion of
separate hardware
platforms vPar Monitor
• manages shared
physical resources Hardware Platform / Hard Partition
• monitors health of
operating system
instances

December 8, 2021 24
HP-UX Virtual Partitions
• Why choose vPars over nPars?
Multiple HP-UX instances − vPars provides:
running on the same system or • Dynamic processor movement
without rebooting the partition
in the same nPar • Single cpu granularity
• Can run within an nPar
Dept. A Dept. A Dept. B Dept. B
App 1
HP-UX
App 1’
HP-UX
App 2
HP-UX
App 3
HP-UX
• Why choose vPars over
Revision Revision Revision Revision resource partitions?
A.1 A.2 B.3 B.3

− vPars provides:
• Software fault isolation
• Different versions of the OS
• Application isolation

rp5470, rp7400, Superdome, rp8400,


rp7410, Itanium2 server
December 8, 2021 25
Where vPars provide the most value
 System/data center consolidation
 development/test environments
 increased system utilization
 varying workload requirements:
–time of day: order entry during day, batch at night
–time of month (payroll, end-of-month/end-of-year
financials
–as particular needs require
 service
provider (providing system
resources to different users/applications)
 unique application tuning of O/S
 time zoning
December 8, 2021 26
File System
recommendations

December 8, 2021 27
File system Options
Using Online JFS improves performance
• Set these mount options
− delaylog
− nodatainlog
− mincache=direct
− convosync=direct
• Enabling largefiles with Online JFS
# fsadm -F vxfs -o largefiles /filesystem

December 8, 2021 28
Oracle db_block_size
• The default Oracle db_block_size on HP-UX is 2048.
• We recommend using:
− db_block_size = 8192 for OLTP Applications
− db_block_size = 8192 to 16384 for DSS/DW Applications
• LVM designed for 8192 blocksize
• Oracle RAC may benefit from a smaller
db_block_size to reduce the amount of data to transfer
between the nodes for cache fusion
• Must be set when creating database

December 8, 2021 29
Data Storage Format
Raw or File System?

• Oracle databases can be implemented either:


• in file systems, or
• in “raw” format
• File Systems:
• overhead (space, CPU, and locking)
• double-buffering & synchronous I/O

December 8, 2021 30
Oracle mapping to LVM

December 8, 2021 31
Space Layout
File System Raw
FS overhead

Oracle Oracle
Data Data
FS file
Logical Volume

Oracle
Data
FS file Oracle
Data

Logical Volume
empty space

Logical Volume

December 8, 2021 32
“Raw” vs. File System
some common misconceptions

PERCEPTION FACT
• Raw requires ugly low- • Raw uses LVM just like
level UNIX commands. file systems.
• Need rocket scientists to • If you manage a FS you
understand & manage. already manage raw.

December 8, 2021 33
Database Administration Example
preparing to create a database

FILE SYSTEM RAW


• create volume group • create volume group
• create logical volumes • create logical volumes
• leave extra room • create extra LVs
• ‘newfs’ on logical vols
• mount file systems
• create Oracle files • create Oracle files
• tie to fs files • tie to LVs
• /orafs/ora/file1.dbf • /dev/vgora/rorafile1.dbf

December 8, 2021 34
Database Administration Example
define oracle data commands

FILE SYSTEM RAW

CREATEDB: CREATEDB:
STARTUP NOMOUNT STARTUP NOMOUNT
CREATE CONTROLFILE CREATE CONTROLFILE
… …
DATAFILE DATAFILE
'/ora1/data01.dbf' '/dev/vg9idata/rdata01_2000M.dbf'

December 8, 2021 35
Database Administration Example
typical database tasks

MONITOR SPACE
FS: OEM + bdf RAW: OEM

ADD MORE SPACE


FS: use extra space in FS or RAW: use extra LVs or
create new FS create new VGs
ACCIDENTALLY DESTROY DATABASE
FS: ‘rm -R *’ or ‘newfs’ or RAW: ‘lvremove’
‘lvremove’
December 8, 2021 36
Backup & Recover

FILE SYSTEM RAW

• RMAN & (Storage Data Protector) • RMAN & (Storage Data Protector)
• fbackup • dd
• tar or cpio or dd • optionally pipe to compress
• optionally pipe to compress

RMAN is the preferred method of backing up Oracle


RMAN does not distinguish between raw and FS

December 8, 2021 37
Summary
Raw-based Databases on HP-UX

• Better performance than HP-UX filesystems

• 33-100% better throughput

• No harder to manage than file systems

• same tools & techniques as file-system admin

December 8, 2021 38
Storage Layout
Recommendations

December 8, 2021 39
Storage technology
then vs. now

then now
disk size 1 0 0 -5 0 0 MB 1 0 0 -5 0 0 GB
a rchitecture JBO D RAID a rra ys
on-boa rd ca che none/ tiny la rge
‘a spindle’ one disk a rra y group?

December 8, 2021 40
The usual database layout
• sort database objects by size and expected I/O volume
• implement high-volume objects in striped volumes
with various stripe-widths
• squeeze other objects in where they fit
• monitor performance of individual disks and objects
• play ‘chess’ with file placement to find best
performance

December 8, 2021 41
‘SAME’ technique
(proposed by Oracle’s Juan Loaiza)

Stripe And Mirror Everything

• stripe all files across maximum # disks

• use 1MB stripe size

• use mirroring for high availability

• place “hot” files on outer edge of disks

• keep it simple

December 8, 2021 42
SAME advantages

• large I/Os minimize impact of disk head movement


• very wide stripe-set allows full I/O throughput
capacity to help all transactions
• no need to consider characteristics of individual
files/tables/transactions

December 8, 2021 43
SAME modified for large storage arrays

• increase stripe depth to 4-8MB


− implement small critical objects with small stripe
• ignore disk-geometry considerations
• create separate stripesets for different subsets of
storage (different RAID levels or disk size/speeds)
• possibly move redo logs to separate device OR use
cache LUN

December 8, 2021 44
Oracle data organization

tablespace
• Objects & Tables
− data, index, etc
tables/o
bjects ‘logical’
• Tablespaces

• Files
− map to space at OS level
file file file file ... ‘physical’

December 8, 2021 45
Oracle mapping to LVM

December 8, 2021 46
EXAMPLE: PV mapping to a disk array
PV mapping to the hp xp array
tablespace tablespace tablespace

oracle

LV LV LV LVM
PV PV PV PV PV vol. grp.

... array

L L L L L L L L L
U UU U U U U UU
N NN N N N N NN
Array (RAID) Array (RAID) Array (RAID)
group
December 8, 2021
group group 47
Implementing SAME

• decide “stripeset width” (# disks or array groups)


− four to eight groups recommended
• create one volume group per stripeset
• create multiple logical volumes per VG
• (create filesystems on top of LVs)
• allocate Oracle objects among stripesets
• map Oracle files to LVs or to filesystem files

December 8, 2021 48
Implementing SAME
• create LVs using LVM ‘extent striping’
− use 4MB or 8MB extents

• divide objects evenly among VGs


− keep each object wholly contained in a VG

• for raw I/O


− create standard-sized LVs
− use symbolic links in Oracle to point to file
locations

December 8, 2021 49
Special Considerations
for Oracle Redo Logs

Online logs deserve very special attention


• multiplex logs in addition to RAID
• locate members so they share no common points of failure at
the disk, channel, or board level
• where possible, locate on dedicated (or otherwise quiet) disk
spindles

Possible downside effects


• excess of disk capacity to meet all these constraints
• isolation to single disks or LUNs may not be possible
• peak throughput is reduced

December 8, 2021 50
Monitor performance & balance I/O

• look for high I/O wait states on shadow


processes

• monitor volume group I/O rates

• move Oracle files (if necessary) to


balance I/O

December 8, 2021 51
EXAMPLE: Performance advisor/xp

monitors
• LDEV I/O
• port utilization
• internal bus
utilization
• cache usage

December 8, 2021 52
Optimal Simplified Architecture
a variation on OFA*
The Optimal Simplified Architecture (OSA) recommends three
main directories:

1. $ORACLE_OWNER $HOME directory


• environment files, configuration files, administrative scripts, etc. This
directory gets taken forward with Oracle version upgrades.
2. $ORACLE_HOME $ORACLE_BASE directories
• Oracle product bits. The $ORACLE_HOME directory changes with
each release of Oracle.
3. $ORACLE_DATA directory
• hot database files, such as DBF files and archive log files which
should not be backed up with normal file system backups.

Also recommend that each $ORACLE_SID be under a unique $ORACLE_OWNER

* See Oracle® Database Installation Guide for more information


December 8, 2021 53
Optimal Simplified Architecture
a variation on OFA
$ORACLE_HOME and $ORACLE_SID
uniquely identify an Oracle server

• A user can change these operating system variables to work


with a different version of the software or a different
instance.

• Table space names should be descriptive and restricted to


eight characters plus a two-digit identifier

• Table space names should be used in the name of the data


file name.

December 8, 2021 54
Optimal Simplified Architecture
Performance Benchmark

File I/O Stats BEFORE AFTER GAIN


Filename mS/ mS/ mS/ mS/ %age %age
Read Write Read Write Read Write

/opt/oracle/u05/thadtbs1.dbf 0.09 16.58 0.09 12.45 24%


/opt/oracle/u05/thadtbs2.dbf 0.21 15.42 0.19 13.68 9% 11%
/opt/oracle/app/ti1tbs.dbf 0.09 12.08 0.09 9.16 24%
/opt/oracle/u02/ti2tbs.dbf 0.09 16.34 0.09 11.16 32%
/opt/oracle/u03/ti3tbs.dbf 0.12 12.69 0.12 10.54 17%
/opt/oracle/u03/ti4tbs.dbf 2.75 20.39 1.61 15.30 41% 25%
/opt/oracle/u01/tttdbs.dbf 6.80 9.61 4.86 6.98 29% 27%

December 8, 2021 55
Summary

• stripe everything
equally& simply
• use broad stripe size to
balance overall I/O
• add capacity in broad
stripeset units
• implement using OSA
• monitor performance to
ensure balance

December 8, 2021 56
Backup and
Recovery best
practices

December 8, 2021 57
HP Recommends
• Use standard tools utilizing HP’s Data Protector (DP) and Oracle’s
Recovery Manager (RMAN)
• Define standard backup/recovery processes utilizing standard tools
• Clearly identify support organization’s roles and responsibilities
for database backup and recoveries
• Simplify/standardize backup/recovery procedures
• The overall goal is to reduce support costs

December 8, 2021 58
HP OpenView Storage Data Protector 5.1
Features

• enterprise data protection that for maximum


automates routine tasks and protection at the lowest
ensures recovery from any
cost
potential disruption
• distributed architecture with
centralized control
• the first to integrate disk- and
tape-based recovery in a single
product

December 8, 2021 59
Newest features in Data Protector 5.1
Enhanced functional capabilities for more control:
• Easy to use Oracle restore GUI allowing administrators to select all
or individual RMAN restore options
• Simplified SAN auto-configuration wizard automatically detecting
and configuring the backup drives in the SAN

Increased resilience with recovery from any disruption


• Industry’s first fully-integrated Zero-Downtime backup solution for
HP StorageWorks EVA and XP arrays
• Integrated Instant Recovery capability for HP StorageWorks EVA
and XP customers enabling the recovery of even terabytes of data in
minutes

December 8, 2021 60
Data Protector (Omniback)
service-driven management approach

enterprise-wide protection
management

• simple GUI

• complete end-to-end management

• fewer staff managing more systems

• reporting on service levels

• portal for providing status info

• integration with Oracle Recovery


Manager (RMAN) for zero-downtime
backup

December 8, 2021 61
data protector automates scheduling & replication of
images to optimize storage capacity
11:55 a.m.

midnight
time incident

within past hour


2 hours
3 hours

automatic management &


recovery re-cycling of recovery
s recovery
images
point images
objective on disk
(how old is the
data to which
I recover?)

12 hours
recovery image
on tape

December 8, 2021 62 62
Page
EXAMPLE: Oracle9i Backup
using Data Protector with Business Copy on HP storage

1. Running Environment

S “Zero Downtime
Backup”

2. Backup

S S

T T

• Freeze point in time on the disks and split the mirror • Resynchronize the mirror
• Unfreeze the disks and perform backup from the mirror
December 8, 2021 63
EXAMPLE: Oracle9i RAC Restore
using Data Protector with Business Copy on HP storage

1. Database Crash 3. Restore from tape

S S

T T

2. Split the pair 4. Restore from T to S-Vol

S S

T T

December 8, 2021 64
Restoring the data takes time

Recovery Time Objective


several hours how long does it take? minutes

Instant
Recovery

tape
backup

December 8, 2021 65
Data Protector - Instant Recovery
A new approach

• Fast, automated restore directly S


from the T-Vol
• Data is instantly available without T
any data neccessary to be moved
• Neither host involved in data
processing
• The backup version will be S
accessible instantaneously and
production can start immediately T

December 8, 2021 66
Data Protector - Instant Recovery
How to use it

Running Split Backup Prepare


• Using Zero Downtime Backup
(ZDB) as a basic concept S S S S
• The link stays split after the backup
T T T T
• This provides a version for fast 1 pm 1:15 pm 3 pm 12:30 pm
recovery from disk
• Restore is done automatically by
Data Protector tape

• No manual mirror handling


required S
Recoverable
Version between
Backup and Prepare
T
December 8, 2021 67
Rotate the Mirrors

• Using up to 3 different mirrors of


XP Business Copy S S
• Allow instant access to earlier version
(t0) at a future time (t2) t0 t0 t1
• i.e. Restore on Wednesday a
version of Monday within minutes S S
• Data Protector automatically manages
the separate mirrors t0 t1 t2 t0 t1 t2
• Define a policy on how the mirror for
the next backup should be prepared
• After the backup finished
• Before the next backup starts

December 8, 2021 68
Maintain Version on Disk only

• The data movement to tape is optional


• Only one version would go to tape P P
(I.e. t1)
t0 t0 t1
• In the time t1 is moved to tape other
versions could be created (t2 & t0)
P P
• Therefore the tape throughput no longer
dictates the backup frequency t0 t1 t2 t0 t1 t2
• More version could be created in a
shorter time
• DB recovery is drastically improved

tape
December 8, 2021 69
data protector
breaks the link between data protector
disk-based protection and tape instant recovery
 administrators can choose
- disk-only protection, management
- tape-only protection, or system
- scheduled combinations application backup device
depending on the business need server server

for a particular application


tape
 once configured, Data Protector t
fully automates the continuous production
data
protection process, including rotation t0 t-1 t -2

of mirrors

 for recovery, administrator selects the


specific recovery image point-in-time copies
(split mirrors or snapshots)
from the GUI
December 8, 2021 70
Recovery Manager (RMAN) features

• Standard tool supplied and supported by Oracle Corporation


• Backups are done at block level, meaning no need for tablespace backup mode,
less overhead
• No extra redo generated during online backup
• Ability to do incremental database backups
• Database and archived log backups are both handled by RMAN
• Corrupt block detection
• Tablespace point in time recovery support
• Ability to do block level recovery (this addresses recovering from corrupt
blocks)
• Support for RAW devices
• Support for Real Application Clusters (RAC)
• Complete integration with HP OpenView Data Protector

December 8, 2021 71
RMAN vs. OS Backup

Feature RMA Op Sys


N
Offline Backups supported supported

Online Backups supported requires Begin/End


Backup stmts.

Corrupt Block detection supported not supported

Automatic backup supported not supported

Backup catalogs supported not supported

December 8, 2021 72
RMAN/Data Protector Database Backup
and Recovery Test Results
Test setup
• 200GB test database

• backups and recoveries were done using different numbers of tape drives and RMAN channels

Results
• best database restore performance
• one channel per tape drive during the backup
• double the number of channels during the restore

Recommendation
• allocate 1 or 2 RMAN channels per tape drive to be used for the backup
• allocate twice as many RMAN channels for the recovery

December 8, 2021 73
Backup/Recovery
Suggested Responsibilities
• DBA group responsible for RMAN catalog setup and
maintenance
• DBA group responsible for contacting Backup team for
backup configuration and scheduling
• RMAN/DP Backups handled by Backup team
• Backup failures and monitoring handled by Backup team
• Recovery responsibility can be handled by DBA group (using
RMAN scripts)
• Recovery responsibility will be migrated to Backup team
(Data Protector V5.1 Oracle Restore GUI training needed in
Backup team)

December 8, 2021 74
Other backup considerations

• RMAN Catalog management and backup strategy


• RMAN/Data Protector training
• Identification of roles/responsibilities of Database and
Backup teams in overall backup/recovery process
• Identification of escalation process to Oracle of
RMAN problems/bugs
• Identification of escalation process to HP of Data
Protector problems/bugs

December 8, 2021 75
Another option for Data Replication
Use of Quest SharePlex

• Activate the SharePlex configuration file on the


current production database
• Create the interim database using a hot backup
and SharePlex Overdrive
• Activate the config file on the backup database
• Begin posting

December 8, 2021 76
Another option for Data Replication
Use of Quest SharePlex

SharePlex

HP- HP-
UX UX

Step one is to establish the working database with minimal impact on


User activity.
•Activate SharePlex configuration file
•Create interim database using a hot-backup and SharePlex Overdrive

December 8, 2021 77
Day to day Oracle
DBA hints and
best practices

December 8, 2021 78
SQLPlus Tips
simple formatting commands
SQLPlus - a command line reporting tool
$ sqlplus ‘/ as sysdba’
SQL> select table_name from dba_tables;
Report formatting commands
alter line lengths (in characters)
alter page lengths (in lines)
alter column widths and styles
suppress the display of duplicate column rows

December 8, 2021 79
SQLPlus Example
example SQL query

Give me a list of all tables with their size and tell me if they’ve
been backed up.

select owner, table_name, tablespace_name, num_rows,


backed_up
from dba_tables
order by owner, tablespace_name

December 8, 2021 80
SQLPlus Example
without formatting commands

December 8, 2021 81
SQLPlus Examples setting
formatting commands

December 8, 2021 82
SQLPlus Example
with column formatting

December 8, 2021 83
SQLPlus Examples of
simple formatting commands
1. Alter line lengths
SQL> SET LINESIZE 70
2. Alter page length
SQL> SET PAGESIZE 65
3. Alter column widths and styles.
SQL> COLUMN surname FORMAT A15
SQL> COLUMN surname FORMAT A15 TRUNC
Display only the first 15 characters of the column.
SQL> COLUMN surname FORMAT A15 WRAP
Display multiple lines, splitting after the 15th character
on each line
For a list of column commands
SQL> HELP COLUMN

December 8, 2021 84
Advice for the DBA
DAILY PROCEDURES
Verify all instances are up

Look for any new alert log entries

Verify success of database backup

Verify success of database archiving to tape

Verify enough resources for acceptable performance

Copy Archived Logs to Standby Database and Roll


Forward

Read DBA manuals for one hour


December 8, 2021 85
Advice for the DBA

NIGHTLY PROCEDURES

Collect volumetric data

WEEKLY PROCEDURES

Look for objects that break rules

Look for security policy violations

Look in SQL*Net logs for errors, issues

Archive all Alert Logs to history

Visit home pages of key vendors

December 8, 2021 86
Advice for the DBA

MONTHLY PROCEDURES

Look for Harmful Growth Rates

Review Tuning Opportunities

Look for I/O Contention

Review Fragmentation

Project Performance into the Future

Perform Tuning and Maintenance

December 8, 2021 87
Example: Hardware for a
Customer Oracle Installation
Intranet
Development Test/Integration Storage
3 Oracle Instance 4 Oracle Instances
75 Developers up to 200 Active users

application server database server application server database server XP512


fail-over server fail-over server fail-over server fail-over server
Internet & CLASS
Ru n At tn . Fa ul t R em ot e P owe r
CL ASS
R un A t n. F aul t R em ot e P owe r
C LASS
R un A t n. Fa ult R e m ot e P ow er
Heartbeat
100/10BaseT Segment - Dedicated Heartbeat
C LASS
Ru n A t tn . Fa ult Re m ot e P ow er

200 GB disk usable


(development)
Extranet HP9000 2000
HP9000 L3000
2x 550 MHz CPUs
HP9 00 0 20 00
HP9000 L3000
3x 550 MHz CPUs
H P9000 20 00
HP9000 L3000
4x 550 MHz CPUs
H P9000 2000
HP9000 L3000
4x 550 MHz CPUs 1.5 TB disk usable
4 GB Memory 4 GB Memory 5 GB Memory 5 GB Memory (test/integration)
Giga Ethernet Giga Ethernet 2 Giga Ethernet 2 Giga Ethernet 1.5 TB disk usable
Fibre Channel Fibre Channel 2 Fibre Channel 2 Fibre Channel (production)
4x 36 GB Disk 4x 36 GB Disk 4x 36 GB Disk 4x 36 GB Disks
User Clients

redundant network

HP e-Firewall
DMZ Production Backup
1 Oracle Instance CLASS
Ru n A t tn . Fa ul t Re m ot e P ow er

Heartbeat
6000 logged-on users 100/10BaseT Segment - Dedicated Heartbeat

HP9000 L3000
application
CLASS R un Att n . Fau l t D is k A Di sk B R em ote Powe r

3000 active users concurrent database 2x 550 MHz CPUs


HP9000 2000

servers
CLASS
Ru n Att n . Faul t Remote Powe r

70% CPU utilization processing server 2 GB Memory


HP9000 2000
CLASS R un Att n . Fau l t D is k A Di sk B R em ote Powe r

server 2 Giga Ethernet Cards


mobile fail-over for 6 Fibre Channel Cards
CLASS
Ru n Att n . Faul t Remote Powe r

device fail-over for concurrent 2x 36 GB Disk


database server processing
gateway
+ application server server
CLASS R un Att n . Fau l t D is k A Di sk B R em ote Powe r

HP9000 2000

2x (Windows) 4x DLT
HP NetServer, LH3000r HP9000 N4000 HP9000 SD32000 HP9000 SD32000 Library
HP VirtualVault
2x 800 MHZ CPUs 8x 550 MHZ CPUs 32x 550 MHz CPUs 32 CPUs (550MHz)
2 GB Memory 16 GB Memory 64 GB Memory 64 GB Memory
CLASS R un Att n . Fau l t D is k A Di sk B R em ote Powe r

2 Giga Ethernet Cards 2 Giga Ethernet Card one partition one partition
2 Fibre Channel Cards 2x 36 GB Disk
2x 36 GB Disk

December 8, 2021 88
High Availability
for Oracle on
HPUX

December 8, 2021 89
Leading Causes of Data Loss

Software
Malfunction
14%

Human Error
Viruses
32%
7%

Natural Disasters
3%

Hardware or System
Malfunction
44%

Source: Understanding Data Loss.


Loss CBL Data Recovery Technologies Inc. Industry Sources – Data Recovery Report

December 8, 2021 90
HP & Oracle handle all causes of
downtime
System MC/SG or RAC on HP,
Failure Fast Restart

Unplanned Data Failure 9i RMAN & HP Data Protector


Downtime & Disaster integration / Data Guard / ...

Human Flashback Query, LogMiner


Error DataGuard, Split Mirror

System Dynamic reconfiguration


Maintenance (Patches/Drivers) + MC/SG or RAC
Planned
Downtime
Database Online Redefinition,
Maintenance Partitioning, Parallel SQL

December 8, 2021 91
HP ServiceGuard cluster
• Non-Shared
Database
Virtual Server with virtual IP Address
• Provides 16 node
failover solution

Before Failover: Oracle Oracle

• Virtual IP Address and


network name refers to
System A
SystemA SystemB
After Failover:
• Virtual IP address and
network name refers to
System B Disk A Disk B

December 8, 2021 92
HP ServiceGuard cluster
Node 2 • Balance workload after
a node failure
Pkg D • Minimize impact on
remaining nodes
Pkg E
Node 1
Node 3
Pkg A
Pkg A
Pkg F
Pkg B Pkg B

Pkg C Node 4 Pkg G

If Node 1 fails... Pkg C

Pkg H

Pkg I
December 8, 2021 93
HP ServiceGuard Software Stack
Active Active
Oracle
Instance 1
failover
Application 2

HP HP
MC/ServiceGuard MC/ServiceGuard

HP-UX 11.x HP-UX 11.x

Database for
Oracle
Exclusive Instance 1 Exclusive
Access Access
Application 2
Storage

December 8, 2021 94
Limits of Cold Failover Clusters
• Scalability of cluster is limited to scalability of one
server
• Load cannot be distributed across all nodes in the cluster
• Cold failover is slow, as many time consuming tasks
must be performed as part of failover
− moving and mounting logical volumes
− starting the oracle instance
− opening the data files
• After failover, the instance caches are cold introducing a
performance brownout

December 8, 2021 95
Oracle9i RAC
with SG Extension for RAC

Oracle9i EE + RAC Oracle9i EE + RAC


Cluster Interconnect
Instance 1 Instance 2

HP ServiceGuard HP ServiceGuard
Extension for RAC Extension for RAC

HP-UX 11.x HP-UX 11.x

Shared Shared Database Shared


Access for Oracle Access
Instances 1 & 2

Redo
Redo Redo
Redo
Redo Redo
Thread1 Thread2

December 8, 2021 96
Oracle9i RAC Architecture in Detail

Global Cache Service


Node 1, Instance A Node 2, Instance B

SGA LCK0 SGA LCK0

Database Database
Buffer Redo Log 9i9iCache
CacheFusion
Fusion Buffer Redo Log
Cache Buffers Cache Buffers

USER
USER DBWR LGWR USER
USER DBWR LGWR
USER USER

Redo
Redo
Redo Data
Data Redo
Redo
Redo
Data
Data
Thread1 Thread2
Control
December 8, 2021 97
Monitoring your
Oracle environment

December 8, 2021 98
Monitoring with OpenView Operations

December 8, 2021 99
Monitoring with
Oracle Enterprise Manager

December 8, 2021 100


Support for Oracle
on HPUX and
Oracle information

December 8, 2021 101


Joint HP/Oracle Support

Simpler, faster problem resolution


keeps your business on-line and your staff on-schedule

Reactive Proactive
Call either
HP or Oracle
for any interoperability
problem

HP and Oracle
provide coordinated
assessments and
optimization

Together, we solve your problem.


December 8, 2021 102
Getting Help – HP’s IT Resource
Center (ITRC)

December 8, 2021 103


Where to go for more information:

http://www.hp.com/go/oracle

December 8, 2021 104


Where to go for more information:

http://otn.oracle.com

http://metalink.oracle.com
December 8, 2021 105
Where to go for more information:

Oracle websites external to HP and Oracle

http://www.optimaldba.com/library.html

http://www.orapub.com/

http://searchoracle.techtarget.com/

December 8, 2021 106


Database-Related Organizations
with web sites
ACM Transactions on Database Systems (TODS)
Canadian Information Processing Society
Computer Measurement Group
DAMA International
IEEE Computer Society
International Oracle Users Group
NaSPA Home Page
Object Database Management Group Home Page
Object Management Group (OMG)
The OLAP Council
Software Publishers Association
Software Research
SQL Standards Home Page
TDWI - The Data Warehouse Institute
Transaction Processing Performance Council (TPC) Home
XML.com

December 8, 2021 107

You might also like