March 24, 2006
Oracle on SUSE Linux
Enterprise Server
Technical Introduction
Arun Singh
Software Engineer Consultant [email protected]
Agenda
Oracle - Introduction
orarun package
Tuning Aspects
Installation Tips
Installation
Q&A
© Novell Inc. 3 Proprietary Systems • Spiralling costs • Interoperability challenges • Growing security threats
• Lack of vendor choice
Open Systems • Increased leverage
of IT skills and assets • Improved security and
manageability
• Vendor flexibility
• Dramatic reductions in operating costs
Enterprises are Shifting to Open
• Today's Enterprise:
Multiple platforms,
proprietary technologies, management and security challenges
• Tomorrow’s Open Enterprise:
Performance, reliability, and world-class support on
standards-based, open platforms
Introducing:
SUSE Linux Enterprise 10
The platform for the open
enterprise.
●Built-in application
security
●Virtualization
●Integrated systems
management
●
Supported on the full
range of hardware
architectures.
© Novell Inc.
5
Operating Systems
Novell's Comprehensive Ecosystem
Developer Communities User Communities
Worldwide Technical Support Worldwide Consulting Services
T ra in in g Ed u ca tio n In d ep en d en t S o ftw ar e V en d o rs In d ep en d en t H ar d w ar e V en d o rs Database Applications Applications User Interface
Data Center Desktop Workgroup Resource Management
Security & Identity
© Novell Inc.
7
Novell and Oracle – Partner
•
Strong Partnership
– Technology and Business Planning
– Relationship since first Oracle-Linux version 8.0.5 on SUSE 6.0
•
Engineer on-site at Oracle
– Testing, Supporting partners/customers on technical issues
•
Regular Technical Meetings
– Bugs, Customer problem escalation, Future features, etc.
•
Combined Testing Efforts
Supported Oracle Platforms
•
Oracle Supported Platforms
– Linux x86
– Linux x86-64 (AMD64, EM64T)
– Linux IA64 (Itanium Processor Family) – IBM zSeries (S/390)
© Novell Inc.
9
Supported Oracle Products
All key Oracle products are certified to run on
SUSE Linux Enterprise Server (SLES)
– Oracle Database Server - Oracle 9iR2, 10gR1, 10gR2, etc. – Oracle Application Server - Oracle iAS 10g, 10gR2, 10gR3 – Oracle Collaboration Suite - 9.0.4, 10g
– Oracle E-Business Suite - Oracle Apps 11i (11.5.9), (11.5.10) – Oracle Developer Suite – Oracle JDeveloper 10gR3 (10.1.3)
Check Certify on Oracle MetaLink (http://metalink.oracle.com) for current certification status of each products.
Oracle Database Server 10g
Highest
Quality of
Service
Lowest
Cost
Easiest to
Manage
Database Grid Application Server Grid© Novell Inc.
11
Oracle Products – In Action
Business
Intelligence Tools Web Services ApplicationsPackaged
Oracle Database Server 10g
•
Oracle Database Server 10g
– Available in various bundling > Enterprise Edition
> Standard Edition (4 CPU)
> Standard Edition One (2 CPU)
> Personal Edition (full featured for individuals) > Lite Edition (mobile devices)
> Express Edition (free version)
– Easy upgrade to 10g from Oracle 8i & Oracle 9i > Check Metalink for version compatibility details.
© Novell Inc.
13
Oracle Database 10gR1 Features
•
Released in Sept. 2003
– Self Managing Database
– Improved installation
– Automatic SGA (System Global Area) Management
– Data Pump
– Job Scheduler
– Flashback Database
– Automatic Database Diagnostic Monitor (ADDM) – SQL Tuning and Access adviser
– RMAN (Recovery Manager)
Oracle Database 10gR2 Features
•
Released in June 2005
– Improved Automatic Storage System (ASM)
– Automatic Backup and Recovery – Secure Backup
– Fault Tolerant Standby – Data Provisioning
– Real Application Clusters (RAC) – Improved Enterprise Manager
– Self Managing Database – Improvements
– Improved DB Control, Job Scheduler
– Native XML Query Support in the Database
© Novell Inc.
15
Oracle Database Express Edition (XE)
•
Released in February 2006 (10gR2 based)
– Free to develop, deploy and distribute
> Developers, DBA's, ISV's, and Educational Institutions and Students – Easy to Install and Remove (rpm format)
– Small foot print (Less RAM and Disk Space required) – Limitations – Restricted to use system resources up to:
> 4GB of user data > 1 GB RAM
> 1 CPU only
> 32 bit Linux (x86) only
Oracle Real Application Clusters (RAC)
•
Application Scalability
– Add instances against same database files providing more Oracle processes and increasing number of users
•
High Availability
– Node & Database instance no longer represent single point of failure
•
Storage Options
© Novell Inc.
17
Oracle RAC Instance Architecture
ASM inst DB inst 2 CRS ASM inst DB inst 3 CRS OCR Vote DB Nodeapps: Vip, ons, gsd Nodeapps: Vip, ons, gsd ASM inst DB inst 1 CRS Nodeapps: Vip, ons, gsd Shared Storage Private Network Public Network Private Network Node 3 Node 1 Node 2
Oracle Products – Roadmap
orarun : What it is?
•
orarun is SUSE Linux rpm-package for easy, and
effortless Oracle Database Install.
– orarun is part of SUSE Linux Enterprise Server
– You can download latest version of orarun from Novell ftp site: > SLES 9: ftp://ftp.novell.com/partners/oracle/sles-9/
© Novell Inc.
21
orarun : What it does?
•
Set up user oracle, groups dba, oinstall
•Set Oracle environment variables
– ORACLE_BASE, ORACLE_HOME, PATH,
LD_LIBRARY_PATH, TNS_ADMIN, ORA_NLS33, etc.
•
Set SUSE Linux Kernel parameters
– Shared memory: shmmax, shmmni, shmall, shm-use-bigpages
– Semaphores: semmsl, semmns, semopm, semmni
– Network (for RAC): ip_local_port_range, (r|w)mem_(max| default)
– Limits: max. open files, max. processes, max core-file size, vm_mapped_ratio
orarun : What it does?
•
Provide Start/Stop script for Oracle services
– Oracle DB, listener, Enterprise Manager, etc. •Increase oracle user's shell limits
– /etc/security/limits.conf – /etc/pam.d/login
•
Provides symlinks for some Oracle products that
expect at non-standard places.
•
Provides helper library for Oracle 9i on SLES9 (32bit)
© Novell Inc.
23
orarun : Main Components
•
/etc/init.d/oracle
– start/stop scripts for Oracle Database and other services.
•
/etc/sysconfig/oracle
– Central place for variables used by start/stop scripts. – Use YaST to modify orarun variables.
•
/etc/profile.d/oracle.[c]sh
– Pre-defined Oracle environment variables. – Edit this file as per your oracle environment.
orarun : YaST Interface
/sbin/yast2 -> System ->/etc/sysconfig Editor
– Search for ORACLE to list available parameters
Optimizations – OS
•
Remember:
– Select certified hardware and components > 32 bit, or 64 bit
– Server should be tuned for specific task > CPU intensive
> Database intensive
– Optimize your server hard disk usage > swap on different disk
> Partition layout > Use RAID
– Monitor Server Resources
© Novell Inc.
27
Optimizations – VM
•
/proc/sys/vm/swappiness
– Default value is 60
– Set Higher value means ideal applications/services are
removed from the memory, allowing the memory to be used for I/O caching
– Set Lower value, If you don't want applications to be removed from memory in favor of I/O caching i.e. avoid swapping.
i.e. echo “10” >/proc/sys/vm/swappiness – use “vmstat” to monitor
Optimizations – IO
•
I/O Scheduler
– Default SLES scheduler is “cfq” works well
– Select at boot time or modify grub entry i.e. elevator=XXX > Select one of four schedulers “cfq or deadline or as or noop”
> Try deadline for disk intensive database application > Try as for fileservers with mostly reads
> Try noop with fast storage system with lots of cache.
•
Tune the I/O Scheduler
– /sys/block/sdX/queue/iosched/quantum - Default value is 4 – Lower value – Shorter latency but lower data throughput – Higher Value – Longer latency but higher data throughput
© Novell Inc.
29
Optimizations – IO
•
I/O Subsystem
– /sys/block/sdX/queue/read_ahead
> Increase from 128 to 512 for fast SCSI disks or RAID.
– /sys/block/sdX/queue/nr_requests
> Increase from 128 to 256 if CFQ scheduler and fast storage is used to
Optimizations – AIO/DIO
•
Asynch I/O, Direct I/O
– You need libaio libraries from OS i.e. rpm -q libaio – Oracle 10gR2 is enabled (default)
> Older Oracle products 9iR2/10gR1 must be relinked with async_on » make PL_ORALIBS=-laio -f ins_rdbms.mk async_on
» make PL_ORALIBS=-laio -f ins_rdbms.mk ioracle – init.ora settings : filesystemio_options=xxx
> Default is NONE
> asynch – to enable ASYNCH only
> directio – to enable Direct IO only (filesystem must support) > setall – both Asynch and Direct IO is enabled.
© Novell Inc.
31
Optimizations – Oracle Tools
•
Oracle 9i
– Install STATSPACK
> sqlplus “/ as sysdba” @ORACLE_HOME/rdbms/admin/spcreate.sql – Collect statistics (PL/SQL) and Analyze performance
> EXECUTE statspack.snap and run spreport.sql
•
Oracle 10g
– AWR (Automatic Workload Repository)
> Built into Oracle Kernel (no SQL) and Collects data every 60 min. (default) > Reports ( HTML via Enterprise Manager)
» Manual: SQL>@$ORACLE_HOME/rdbms/admin/awrrpt.sql – ADDM (Automatic Database Diagnostic Monitor)
> Reports are based on AWR snapshots
Summary : Oracle on SUSE Linux
•
SUSE Linux Enterprise Server (
update with latest Service Packs)
– Scales better for SMP's – Improved I/O Features
•
Configure I/O Properly
– Ensure HBA's cache is enable
– Use RAID and analyze performance with different block sizes
•
Enable AIO/Direct IO
– Adjust filesystemio_option in init.ora (Default is NONE)
•
Performance Analysis
– Use Enterprise Manager Performance Analysis feature to collect and
SUSE Linux – Required Packages
•
Packages
– Default SUSE Linux Package Selection – C/C++ Compiler and Tools
– Oracle Server Base > Provides orarun package
•
Other useful packages
– sysstat
> Provides sar, iostat, mpstat, etc.
– OCFS2
© Novell Inc.
35
SUSE Linux – Version Check
•
Verify SUSE Linux version before installing Oracle
– SPident
– /etc/SuSE-release
SUSE Linux File System Selection
•
ReiserFS v3
– Scalable & Performant – Best for lot of small files
•
EXT3
– Performant
– Best for small file systems (few files)
•
XFS
– Scalable & Performant – Best for lot of large files
© Novell Inc.
37
SUSE Linux – Oracle 10gR2
Problem:
Oracle 10gR2 Universal Installer reports unsupported OS
on SUSE Linux Enterprise 10 based products.
Solution:
Start Oracle Installer with
ignoreSysPrereqs
option.
i.e. ./runInstaller -ignoreSysPrereqs
SUSE Linux – Oracle 10gR2
Problem:
Oracle 10gR2 Installation will hang at link time due to
incorrect syntax in $ORACLE_HOME/bin/gennttab file.
...
LIB=`$ECHO ${TtoLIB} | $SED 's/ /\\
/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'` INI=`$ECHO ${TtoINI} | $SED 's/ /\\
/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'` BAS=`$ECHO ${TtoBAS} | $SED 's/ /\\
/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'` ...
© Novell Inc.
39
SUSE Linux – Oracle 10gR2 Fix
Solution:
Once Installer copies gennttab file, edit line “LIB, INI & BAS” in $ORACLE_HOME/bin/gennttab before linking starts.
LIB=`$ECHO ${TtoLIB} | $SED 's/ /\\
/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
Correct Syntax:
LIB=`$ECHO ${TtoLIB} | $SED 's/ /\n/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
INI=`$ECHO ${TtoINI} | $SED 's/ /\n/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
BAS=`$ECHO ${TtoBAS} | $SED 's/ /\n/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
© Novell Inc.
41
Installation – Oracle Database XE
•
Download rpm from Oracle Technology Network
– http://www.oracle.com/technology/software/products/database/xe/htdocs/102xelinsoft.html
•
Install Oracle Database XE package
Installation – Oracle Database XE
•
Configure -
/etc/init.d/oracle-xe configure© Novell Inc.
43
Oracle Database XE – Administration
•
Web Access
– http://host:port/apex
i.e. http://localhost:8080/apex
© Novell Inc.
45
Oracle 10g – Pre Installation task
•
Install orarun package
– Change oracle entry (/bin/false to /bin/bash) in /etc/passwd – Set password for user oracle i.e. passwd oracle
•
Set Linux Kernel Parameters
– SET_ORACLE_KERNEL_PARAMETERS="yes" (default) in /etc/sysconfig/oracle to load at boot time.
Oracle 10g – Post Installation Task
•
Edit /etc/oratab
– Change your Oracle Database Instance to “Y”
•
Oracle Database start at boot time
– Edit “/etc/sysconfig/oracle” or use YaST to change Startup parameters i.e. Change START_ORACLE_DB=”yes”
•
$ORACLE_HOME/bin/dbstart
– 10gR1: Fix ORATAB location to /etc/oratab or create sym link
© Novell Inc.
47
Installation – Check
Installation – Choice
Select Advanced Installation for customization.
© Novell Inc.
49
Installation – OS Checks
© Novell Inc.
51
Installation – Continue
Installation – Database Configuration
© Novell Inc.
53
Installation – Complete
© Novell Inc.
55
SQLPLUS – Command Line
•
Start/Stop Database
•
Set/Check Database Parameters
New in SUSE Linux Enterprise Server 10
• Enhanced data center deployment and management
– Xen 3 virtualization
– Support for Intel Vanderpool and AMD Pacifica dramatically improves system
utilization and optimizations for multi-core processors
– Improved performance and SMP scalability
– Advanced management, instrumentation, and monitoring tools
• Expanded hardware support
– Support for latest hardware: storage, networking, platform management,
graphics, audio, Bluetooth and USB devices
– Enhanced storage capabilities: Storage foundation for HA-clusters integrating
Oracle Cluster File System (OCFS), EVMS and Heartbeat; NFS v4; iSCSI
• Unmatched security
– Only Linux server with built-in application security
SUSE Linux Enterprise Sever is the best-engineered Linux server, the best choice for mission-critical workloads.
© Novell Inc.
59
New in SUSE Linux Enterprise Desktop 10
• New levels of end user productivity– Powerful desktop productivity tools: E-mail, desktop search, Firefox Web browser,
Instant messaging, multi-media
– OpenOffice.org 2.0 office suite and Visual Basic macro conversion
– Easy-to-learn desktop environment with advanced animations and rendering • Seamless integration with enterprise systems
– Enhanced hardware support for USB and Bluetooth devices
– Seamless connectivity to mixed networks, including Novell eDirectory and Active
Directory
– Printer support including auto driver download and installation, MS printer support • Flexible deployment options
– Thin and thick-client deployment
– Easy deployment and desktop lock-down
Novell is #1 on the Linux desktop, providing vendor choice and dramatic costs savings for basic office workers
Information
Novell
– General: http://www.novell.com/oracle
– Novell SUSE/Oracle mailing list : [email protected] – Installation Documents and White papers:
http://www.novell.com/products/linuxenterpriseserver/oracle/documents.html
Oracle
– SW Downloads: http://otn.oracle.com/Linux – Certify and Patches: http://metalink.oracle.com
– Oracle Discussion Forums : httpL//forums.oracle.com – Oracle Online Documents:
> Oracle XE: http://www.oracle.com/pls/xe102/homepage > Oracle 10gR2: http://www.oracle.com/pls/db102/homepage
Unpublished Work of Novell, Inc. All Rights Reserved.
This work is an unpublished work and contains confidential, proprietary, and trade secret information of Novell, Inc. Access to this work is restricted to Novell employees who have a need to know to perform tasks within the scope of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of Novell, Inc. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.
General Disclaimer
This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. Novell, Inc., makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc., reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All Novell marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners.