Best Practices for Oracle on HPUX

Sandy Gruver Senior Technical Consultant HP/Oracle Advanced Technology Center
© 2004 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice

‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡

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 3, 2010 2

Before Installing Oracle on HPUX

December 3, 2010


2010 4 .SAM December 3.Brief review HPUX SysAdm tool .

í 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.0 and HPUX 11i. 2010 5 . 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 3. 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).H/W and S/W requirements Overall system requirements ‡ Operating System í HPUX 11.

com/SUPPORT_PLUS For individual patches: 2010 6 .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 3.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.hp.

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 178 to 255 December 3. the range is 153 to 255 í On HP-UX 11i. 2010 7 .Enhancing performance of Oracle enable Sched_Noage As root.

For Oracle10g: Create a Unix account (extjob) to own the executable extjob # /usr/sbin/useradd extjob ‡ After installing Oracle.nobody extjob # chown extjob extjob # chmod 4711 extjob 8 December 3. dba) # /usr/sbin/groupadd oinstall # /usr/sbin/groupadd dba 2. 2010 .Oracle Users and Groups 1. Create a UNIX account (oracle) to own Oracle software # /usr/sbin/useradd -g oinstall -G dba oracle 3. Create UNIX groups (oinstall. make these changes to the extjob file ‡ ‡ ‡ ‡ # cd oracle_home/bin # mv extjob.

export ORACLE_SID=oratest ‡ PATH e. export LD_LIBRARY_PATH=$ LD_LIBRARY_PATH:$ORACLE_HOME/lib64 December 3. export ORACLE_HOME=/oracle/9i_64b ‡ ORACLE_SID e.g.g.A Few Important Environment variables ‡ ORACLE_HOME e. export PATH=$ORACLE_HOME/bin:$PATH ‡ SHLIB_PATH/LD_LIBRARY_PATH e. 2010 9 .g.g.

2010 10 .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.loc inventory_loc=/u01/app/oracle/oraInventory inst_group=oinstall ‡ * See simplified OFA later in presentation December 3. set í í umask 022 xhost + Check the Oracle Inventory information after installation # more /var/opt/oracle/oraInst.

3. 5. then choose OK Set Oracle initialization parameter DISK_ASYNCH_IO to TRUE. Select Action>Modify Configurable Parameter. 6. Specify a new value for the parameter. 8. 2010 11 . 7. Choose the Kernel Configuration area. 9. Choose the Drivers area. Select List>Configurable Parameters. December 3. 4. Enter the following command as the root user: # sam 2. Select Actions>Add Driver to Kernel. Choose the MAX_ASYNC_PORTS parameter. Choose the asynchronous disk driver (asyncdsk).Implementing Asynchronous I/O NOTE: Done ONLY if using RAW (not fs) storage 1.

Implementing Asynchronous I/O December 3. 2010 12 .

Recommended Kernel parameter settings for Oracle December 3. 2010 13 .

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 .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.PA-RISC 2. 2010 14 .0 (LP64) December 3.

Recommended Minimum HP-UX Kernel Settings for Oracle DBs File System buffer-Cache Parameters: bufpages Pages of static buffer cache ± older parm 0 between 3 and 10 % of memory between 2 and 5% of memory 1024 1024 (default) (15 * NPROC + 2048) (NPROC) (at least 4096) (8 * NPROC + 2048) 15 dbc_max_pct Max dynamic buffer cache dbc_min_pct Min dynamic buffer cache Open or Locked Files Parameters: maxfiles maxfiles_lim nfile nflocks ninode December 3. 2010 Soft limit for open files Hard limit for open files Open files limit File lock limit Max inodes in memory .

Recommended Minimum HP-UX Kernel Settings for Oracle Parameters for Logical Volume Manager: DBs maxvgs Maximum volume groups on the system Increase to the number of volume groups you would like to have on the system (maximum 256) Parameters for Memory Paging and Variable Page Size: maxswapchunks swapmem_on swchunk vps_ceiling December 3. 2010 Max swap space on the system Enable/disable pseudo-swap Swap chunk size Max page size in Kbytes 16384 1 (on) 4096 (up to 65536 for large RAM) 64 16 .

Recommended Minimum HP-UX Kernel Settings for Oracle Parameters for Process Management: DBs maxdsiz maxdsiz_64bit maxssiz maxssiz_64bit maxtsize maxuprc max_thread_proc nkthread nproc December 3. 2010 Max process data seg size for 32bit procs Max process data seg size for 64bit procs Max process storage seg size for 32bit procs Max process storage seg size for 64bit procs Max process text seg size Max # of procs/user Max threads/proc Max kernel threads Max procs/system 1073741824 bytes or (0x40000000) 2147483648 bytes or (0x80000000) 134217728 bytes 1073741824 bytes or (0x40000000) 128MB ((NPROC*9)/10) 256 (((NPROC * 7) / 4) + 16) 4096 17 .

2010 Max sems/system Max sems for users/sys Max undos/sem Max sem value 4096 (semmni*2) (nproc-4) 32767 18 .Recommended Minimum HP-UX Kernel Settings for Oracle DBs InterProcessCommunication Message Parameters:Message map size msgmap msgmni msgseg msgtql Max msg queues # segs in msg queue Total msgs on system (2+msgmni) nproc 32767 nproc InterProcessCommunication Semaphore Parameters: sem map size semmap Free (semmni+2) semmni semmns semmnu semvmx December 3.

no of shadow processes + no of parallel query slaves (could go up to nproc) set to number of concurrent Oracle DB users + 64 19 maxusers December 3. 2010 .Recommended Minimum HP-UX Kernel Settings for Oracle InterProcessCommunication Shared Memory Parameters: DBs shmmax Max shared memory segment Max segments/system Max segments/proc Large enough to hold the entire SGA in one shared memory segment 512 120 per Oracle database shmmni shmseg Miscellaneous Parameters: max_async_ports Max ports to asynch driver/system Max simultaneous users/system max.

Updating Kernel Parameters 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 3. 2010 20 OR Use SAM .

Using WLM with Oracle and HPUX partitions December 3. 2010 21 .

2010 22 . server resource pool security Oracle Apps Reporting December 3.HP Virtual Server Environment: server resource flexing for applications Policy engine provisions resources based on SLOs and business priorities for each application.

HP Partitioning Continuum Clustered nodes Hard partitions Virtual partitions Resources partitions nPar vPar PRM/pSets OS image with HW isolation hard partition OS image with SW isolation OS image with SW isolation 1 OS image Application 1 with guaranteed compute resources Application 2 with guaranteed compute resources OS image with HW isolation OS image with HW isolation OS image with SW isolation Application n with guaranteed compute resources HP-UX Workload Manager Isolation Highest degree of separation December 3. 2010 Flexibility Highest degree of dynamic capabilities 23 .

vPars logical overview ‡ multiple applications. instances or versions ‡ name space and resource isolation vPar1 vPar2 vPar3 Dept. B App 2 ‡ individual ³servers´ ‡ different OS revs ‡ each OS custom-tunable ‡ dynamic resource allocations ‡ creates illusion of separate hardware platforms ‡ manages shared physical resources ‡ monitors health of operating system instances HP-UX Revision A Patch Lvl 1 HP-UX Revision A Patch Lvl 2 HP-UX Revision B Patch Lvl 1 vPar Monitor Hardware Platform / Hard Partition December 3. A App 1¶ Dept. 2010 24 . A App 1 Dept.

B App 2 HP-UX Revisio n B.HP-UX Virtual Partitions ‡ Multiple HP-UX instances running on the same system or in the same nPar Dept. A App 1 HP-UX Revisio n A. rp7400.3 Dept. rp8400. Itanium2 server December 3. rp7410.3 Why choose vPars over nPars? í vPars provides: ‡ Dynamic processor movement without rebooting the partition ‡ Single cpu granularity ‡ Can run within an nPar ‡ Why choose vPars over resource partitions? í vPars provides: ‡ Software fault isolation ‡ Different versions of the OS ‡ Application isolation rp5470. B App 3 HP-UX Revisio n B.1 Dept. Superdome. 2010 25 .2 Dept. A App 1¶ HP-UX Revisio n A.

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 3. 2010 26 .

File System recommendation s

December 3, 2010


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 3, 2010


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 3, 2010 29


and locking) double-buffering & synchronous I/O December 3.Data Storage Format Raw or File System? ‡ Oracle databases can be implemented either: ‡ ‡ in file systems. 2010 30 . CPU. or in ³raw´ format ‡ File Systems: ‡ ‡ overhead (space.

Oracle mapping to LVM December 3. 2010 31 .

Space Layout File System FS overhead Raw Oracle Data FS file Oracle Data Logical Volume Oracle Data FS file Oracle Data Logical Volume empty space Logical Volume December 3. 2010 32 .

‡ ‡ December 3. File System some common misconceptions PERCEPTION ‡ FACT ‡ Raw requires ugly lowlevel UNIX commands. 2010 33 .³Raw´ vs. Raw uses LVM just like file systems. If you manage a FS you already manage raw. Need rocket scientists to understand & manage.

2010 34 .Database Administration Example preparing to create a database FILE SYSTEM ‡ create volume group ‡ create logical volumes ‡ leave extra room ‡ µnewfs¶ on logical vols ‡ mount file systems ‡ create Oracle files ‡ tie to fs files ‡ /orafs/ora/file1.dbf RAW ‡ create volume group ‡ create logical volumes ‡ create extra LVs ‡ create Oracle files ‡ tie to LVs ‡ /dev/vgora/rorafile1.dbf December 3.

dbf' RAW CREATEDB: STARTUP NOMOUNT CREATE CONTROLFILE « DATAFILE '/dev/vg9idata/rdata01_2000M. 2010 35 .Database Administration Example define oracle data commands FILE SYSTEM CREATEDB: STARTUP NOMOUNT CREATE CONTROLFILE « DATAFILE '/ora1/data01.dbf' December 3.

Database Administration Example typical database tasks MONITOR SPACE FS: OEM + bdf RAW: OEM ADD MORE SPACE FS: use extra space in FS or create new FS RAW: use extra LVs or create new VGs ACCIDENTALLY DESTROY DATABASE FS: µrm -R *¶ or µnewfs¶ or µlvremove¶ December 3. 2010 RAW: µlvremove¶ 36 .

Backup & Recover FILE SYSTEM ‡ ‡ ‡ RAW ‡ ‡ RMAN & (Storage Data Protector) fbackup tar or cpio or dd ‡ RMAN & (Storage Data Protector) 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 3. 2010 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 3. 2010 38 .

2010 39 .Storage Layout Recommendatio ns December 3.

Storage technology then vs.00 ID arrays large array gro December 3.00 J D none/ tiny one isk now 100. now then isk size architect re on-boar cache µa s in le¶ 100. 2010 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 41 ‡ ‡ ‡ ‡ December 3. 2010 .

µ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 42 December 3. 2010 .

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 3. 2010 43 .

2010 .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 44 ‡ December 3.

. etc Tablespaces Files í map to space at OS level tables/ objects µlogical¶ ‡ ‡ file file file file .. µphysical¶ December 3. 2010 45 .Oracle data organization tablespace ‡ Objects & Tables í data. index.

2010 46 .Oracle mapping to LVM December 3.

. grp.EXAMPLE: PV mapping to a diskarray array PV mapping to the hp xp tablespace tablespace tablespace oracle LV PV PV PV LV PV PV LV LVM vol.. . L L L U U U N N N Array (RAID) group December 3. 2010 array L L L U U U N N N Array (RAID) group L L L U U U N N N Array (RAID) 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 3. 2010 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 49 ‡ ‡ December 3. 2010 .

or board level ‡ where possible. 2010 50 . 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 3. channel.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.

2010 51 .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 3.

EXAMPLE: Performance advisor/xp monitors ‡ LDEV I/O ‡ port utilization ‡ internal bus utilization ‡ cache usage December 3. 2010 52 .

This directory gets taken forward with Oracle version upgrades. etc. The $ORACLE_HOME directory changes with each release of Oracle. configuration files. Also recommend that each $ORACLE_SID be under a unique $ORACLE_OWNER * See Oracle® Database Installation Guide for more information December 3. $ORACLE_HOME $ORACLE_BASE directories ‡ Oracle product bits. 3. such as DBF files and archive log files which should not be backed up with normal file system backups. 2. administrative scripts. $ORACLE_DATA directory ‡ hot database files.Optimal Simplified Architecture a variation on OFA* The Optimal Simplified Architecture (OSA) recommends three main directories: 1. $ORACLE_OWNER $HOME directory ‡ environment files. 2010 53 .

December 3. ‡ 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.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. 2010 54 .

45 13. 2010 55 .08 16.09 0.61 0.09 0.98 24% 11% 24% 32% 17% 25% 27% /opt/oracle/u05/thadtbs1.42 12.dbf /opt/oracle/u02/ti2tbs.86 12.68 9.12 1.16 10.dbf /opt/oracle/u05/thadtbs2.75 6.09 0.09 0.54 15.21 0.69 20.80 16.34 12.61 4.12 2.39 9.19 0.dbf /opt/oracle/u01/tttdbs.09 0.dbf /opt/oracle/app/ti1tbs.dbf /opt/oracle/u03/ti4tbs.09 0.dbf /opt/oracle/u03/ti3tbs.Optimal Simplified Architecture Performance Benchmark File I/O Stats Filename BEFORE AFTER GAIN mS/ mS/ mS/ mS/ %age %age Read Write Read Write Read Write 0.dbf 9% 41% 29% December 3.16 11.58 15.30 6.

2010 56 ‡ ‡ ‡ ‡ .Summar y ‡ 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 3.

2010 57 .Backup and Recovery best practices December 3.

2010 58 ‡ ‡ ‡ ‡ .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 3.

1 Features ‡ ‡ ‡ enterprise data protection that automates routine tasks and ensures recovery from any potential disruption distributed architecture with centralized control the first to integrate disk.and tape-based recovery in a single product for maximum protection at the lowest cost December 3. 2010 59 .HP OpenView Storage Data Protector 5.

2010 60 .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 3.

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 3. 2010 61 .

incident within past hour 2 hours 3 hours recovery point objective (how old is the data to which I recover?) 12 hours automatic management & re-cycling of recovery s images recovery images on disk recovery image on tape December 3.m. 2010 Page 62 62 .data protector automates scheduling & replication of images to optimize storage capacity midnight time 11:55 a.

EXAMPLE: Oracle9i Backup using Data Protector with Business Copy on HP storage 1. 2010 S T ‡ Resynchronize the mirror 63 . Running Environment S T ³Zero Downtime Backup´ 2. Backup S T ‡ Freeze point in time on the disks and split the mirror ‡ Unfreeze the disks and perform backup from the mirror December 3.

EXAMPLE: Oracle9i RAC Restore using Data Protector with Business Copy on HP storage 1. 2010 4. Split the pair S T December 3. Database Crash S T 3. Restore from tape S T 2. Restore from T to S-Vol S T 64 .

2010 65 .Restoring the data takes time Recovery Time Objective several hours how long does it take? minutes Instant Recovery tape backup December 3.

Instant Recovery A new approach ‡ Fast.Data Protector . automated restore directly from the T-Vol ‡ Data is instantly available without any data neccessary to be moved ‡ Neither host involved in data processing ‡ The backup version will be accessible instantaneously and production can start immediately S T S T December 3. 2010 66 .

2010 S T 67 .Instant Recovery How to use it Running Split Backup Prepare ‡ Using Zero Downtime Backup (ZDB) as a basic concept ‡ The link stays split after the backup ‡ This provides a version for fast recovery from disk ‡ Restore is done automatically by Data Protector ‡ No manual mirror handling required S T 1 pm S T 1:15 pm S T 3 pm S T 12:30 pm tape Recoverable Version between Backup and Prepare December 3.Data Protector .

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

2010 69 .e. t1) ‡ In the time t1 is moved to tape other versions could be created (t2 & t0) ‡ Therefore the tape throughput no longer dictates the backup frequency ‡ More version could be created in a shorter time ‡ DB recovery is drastically improved P t0 P t0 t1 t2 t0 t0 P t1 P t1 t2 tape December 3.Maintain Version on Disk only ‡ The data movement to tape is optional ‡ Only one version would go to tape (I.

disk-only protection. administrator selects the specific recovery image from the GUI December 3. or . Data Protector fully automates the continuous protection process. including rotation of mirrors for recovery.tape-only protector breaks the link between disk-based protection and tape administrators can choose . .scheduled combinations depending on the business need for a particular application once configured. 2010 data protector instant recovery management system application server backup device server tape t production data t0 t1 t-2 point-in-time copies (split mirrors or snapshots) 70 .

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 3.Recovery Manager (RMAN) features ‡ ‡ Standard tool supplied and supported by Oracle Corporation Backups are done at block level. 2010 71 ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ . meaning no need for tablespace backup mode.

RMAN vs. OS Backup Feature Offline Backups Online Backups RMAN supported Op Sys supported supported requires Begin/End Backup stmts. Corrupt Block detection supported not supported Automatic backup supported supported not supported Backup catalogs not supported December 3. 2010 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 3. 2010 73 .

1 Oracle Restore GUI training needed in Backup team) December 3. 2010 74 .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.

2010 75 ‡ ‡ ‡ ‡ .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 3.

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 3. 2010 76 .

‡Activate SharePlex configuration file ‡Create interim database using a hot-backup and SharePlex Overdrive December 3. 2010 77 .Another option for Data Replication Use of Quest SharePlex SharePlex HPUX HPUX Step one is to establish the working database with minimal impact on User activity.

Day to day Oracle DBA hints and best practices December 3. 2010 78 .

a command line reporting tool $ sqlplus µ/ as sysdba¶ SQL> select table_name from dba_tables.SQLPlus Tips simple formatting commands SQLPlus . 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 3. 2010 79 .

select owner. backed_up from dba_tables order by owner. tablespace_name. num_rows. table_name.SQLPlus Example example SQL query Give me a list of all tables with their size and tell me if they¶ve been backed up. 2010 80 . tablespace_name December 3.

2010 81 .SQLPlus Example without formatting commands December 3.

2010 82 .SQLPlus Examples setting formatting commands December 3.

2010 83 .SQLPlus Example with column formatting December 3.

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

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 December 3. 2010 Read DBA manuals for one hour 85 .

issues Archive all Alert Logs to history Visit home pages of key vendors December 3. 2010 86 .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.

2010 87 .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 3.

Example: Hardware for a Customer Oracle Installation December 3. 2010 88 .

High Availability for Oracle on HPUX December 3. 2010 89 .

Leading Causes of Data Loss Software Malfunction 14% Human Error 32% Viruses 7% Natural Disasters 3% Hardware or System Malfunction 44% Source: Understanding Data Loss CBL Data Recovery Technologies Inc. Industry Sources ± Data Recovery Report Loss. 2010 90 . December 3.

Fast Restart 9i RMAN & HP Data Protector integration / Data Guard / . 2010 91 . Flashback Query... Partitioning.HP & Oracle handle all causes of downtime System Failure Unplanned Downtime Data Failure & Disaster Human Error MC/SG or RAC on HP. Parallel SQL December 3. LogMiner DataGuard. Split Mirror Planned Downtime System Maintenance Database Maintenance Dynamic reconfiguration (Patches/Drivers) + MC/SG or RAC Online Redefinition.

HP ServiceGuard cluster ‡ Non-Shared Database ‡ Provides 16 node failover solution Before Failover: Virtual Server with virtual IP Address 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 December 3. 2010 Disk A Disk B 92 .

Node 4 Pkg E Pkg A ‡ ‡ Balance workload after a node failure Minimize impact on remaining nodes Node 3 Pkg F Pkg B Pkg G Pkg C Pkg H Pkg I December 3.HP ServiceGuard cluster Node 2 Pkg D Node 1 Pkg A Pkg B Pkg C If Node 1 fails. 2010 93 ...

HP ServiceGuard Software Stack Active Oracle Instance 1 failover Active Application 2 HP MC/ServiceGuard HP-UX 11.x Database for Oracle Instance 1 Application 2 Storage HP MC/ServiceGuard HP-UX 11.x Exclusive Access Exclusive Access December 3. 2010 94 .

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. 2010 . the instance caches are cold introducing a performance brownout 95 December 3.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.

Oracle9i RAC with SG Extension for RAC Oracle9i EE + RAC Instance 1 HP ServiceGuard Extension for RAC HP-UX 11.x Shared Access Redo Redo Redo Cluster Interconnect Oracle9i EE + RAC Instance 2 HP ServiceGuard Extension for RAC HP-UX 11.x Shared Database for Oracle Instances 1 & 2 Shared Access Redo Redo Redo Thread1 Thread2 December 3. 2010 96 .

Instance B SGA Database Buffer Cache LCK0 SGA Database Buffer Cache LCK0 Redo Log Buffers 9i Cache Fusion 9i Cache Fusion Redo Log Buffers USER USER USER DBWR LGWR USER USER USER DBWR LGWR Redo Redo Redo Thread1 December 3. 2010 Data Data Data Data Control Redo Redo Thread2 Redo 97 . Instance A Node 2.Oracle9i RAC Architecture in Detail Global Cache Service Node 1.

2010 98 .Monitoring your Oracle environment December 3.

2010 99 .Monitoring with OpenView Operations December 3.

2010 100 .Monitoring with Oracle Enterprise Manager December 3.

Support for Oracle on HPUX and Oracle information December 3. 2010 101 .

2010 102 . December 3. we solve your problem.Joint HP/Oracle Support Simpler. faster problem resolution keeps your business on-line and your staff on-schedule Reactive Call either HP or Oracle for any interoperability problem HP and Oracle provide coordinated assessments and optimization Proactive Together.

Getting Help ± HP¶s IT Resource Center (ITRC)

December 3, 2010


Where to go for more information:

December 3, 2010


Where to go for more information:
December 3, 2010 105

Where to go for more information: Oracle websites external to HP and Oracle http://www.html http://www. 2010 106 .com/ December 3.

2010 107 .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 .com December 3.The Data Warehouse Institute Transaction Processing Performance Council (TPC) Home XML.