DBA or Dinosaur?
Are you still on version 7.3.4 of Oracle?
Rarely go to meetings with other human beings?
Do people wonder what do you do all day?
Did you “network” with others at the conference? Did you bring any
business cards to pass around?
Do you only “linger” on email lists?
Do you know what the newest version of Oracle is? Can you list at
least 5 of the new features for that version?
Do you have a migration to the next CPU,
patchset, version, hardware replacement in
progress?
Change is our business. Business is changing.
Outage Windows Shrinking
• Upgrade process can be in STEPS
• Mixed Environment – harder with Windows
• Smaller Outages – component by component
• Safer Migration – no longer all or none
• Less stress – more confidence in fallback
position
• Maximum Availability Architecture *
• 11g Upgrade Companion ** extensive doc
Compatible with Earlier
Versions*
• Oracle Net Services: LISTENER.ORA,
SQLNET.ORA
• Clients (SQLNET, JDBC, ODBC )
• RMAN Catalog and Database
• Grid Control Repository Database
• ASM (Migrating or new installation)
• EXPORT/IMPORT compatibility**
Before Starting
• Database Healthcheck*
• New Hardware – Recommended for point releases
or replace in three years at end of warranty, commodity hardware
• Document Current Environment – Wiki, OCM
• Mod-Tracking Software/Code Repository**
• Environment Adaptable to Change
• Install Highest Version and CPU available
• Check out 4thQ 2008 issue of “SELECT” –
“How Dell IT Enforces Global Standards
through Automation” ***
Oracle Configuration
Manager – Metalink
• Requires Metalink account under “My Configs and Projects”
• Secure, automated configuration collection using Oracle's Configuration Manager
• Proactive configuration-specific notification of security and product alerts
• Proactive HealthChecks based on best practices
• Simplified Service Request logging, tracking and reporting
• Ability to define key projects, contacts and milestones
Determine Resource Costs
Percentage of Time for DBA Tasks
55% Ongoing Maintenance
12% Database Creation/Configuration
6% Loading/Archiving Data
6% Installation
6% Software Management
* From IOUG survey
Enviroment Adaptable to Change?
Not so Good….
• Hard-coded Passwords
• Hard-coded
Environmental Variables
• Profile presets variables
Better….
• Pull from a protected
password file or database
• Custom Dynamic
Environmental Variables
Using ORACLE_SID
• Use oratab and oraenv
• Move C, COBOL batch
processing off database
server * (TWO_TASK)
• Use alias **Unix*oracle recommendation – removes
64-bit vs 32-bit dependencies
Pull From a Password File
Unix Example:
PASS=`grep username /u01/.protectedfile | cut -
f 2`; export PASS
Pulls both username and password
Password file needs to have entries:
username/password
PASS=`grep username /u01/.protectedfile | cut -
d / -f 2`; export PASS
Pulls only password
Custom Dynamic Environmental
Variables using ORACLE_SID
• Set variables as needed.
• Use ORAENV to Source Variables
# Install any "custom" code here
case "$ORACLE_SID" in
"SID") . /u01/app/oracle/SID.ini ;;
"SIDT") . /u01/app/oracle/SIDT.ini ;;
"SIDD") . /u01/app/oracle/SIDD.ini;;
esac
• ORAENV_ASK=NO; export ORAENV_ASK
SIDT.ini
ORACLE_HOME=/u01/app/oracle/product/10gR2
PATH=$MY_EXE_HOME:$MY_LINKS:$ORACLE_HOME/bin:$PATH
ORACLE_SID=SIDT
export ORACLE_SID ORACLE_HOME PATH
Instead of hard-coding environmental variables into
your profile, set them when executing oraenv
Migration
Time Frame
• 3 months – CPU
• 6 months – Major
Patchset
• 1 – 2 years – Next Major
Release
Testing Tools*
• Batch Processes – Large amount
of redo
• OSWatcher
• Orion
• Statspack
• AWR – requires “Pack” license
• Real Application Testing -11g
• Proactive = Forecasting***
Proactive = Forecasting
• CPU and I/O Systems
• Key Metrics – utilization, queue length and
response time
• Formula for different what-if scenarios
• Need OS statistics and Oracle statistics
• www.orapub.com
• “BALLPARK” numbers- not exact
CPU Formula Variables
λ : Workload arrival rate (v$sysstat)
S : Time to service one workload unit (derived)
U : Utilization or CPU busyness. (sar)
Q : Queue length (derived)
M : Number of CPUs
R : Response Time
W : Wait Time
U = ( S λ ) / M R = S / (1 - U^M) Q = ( MU / (1 - U^M) ) – M R = S + W
Case - 4X SunFire 4800 64
Normal Production Workload
SunOS nodename 5.9 Generic_117171-07 sun4u 08/15/2006
09:00:51 %usr %sys %wio %idle
09:01:51 21 17 1 61
User Calls/Second in the same time period
= 85.29/second (user calls/second)
M= 4 (number of CPUs)
U= .39 or 39% (utilization)
Math
S = 0.018 sec/call ; U = ( S λ ) / M
0.39 = ( S * 85.29 ) / 4
R = 0.018 sec/call ; R = S / (1 - U^M)
R = 0.018 / ( 1 – 0.39^4 )
Q = -3.417 calls ; Q = ( MU / (1 - U^M) ) – M
Q = ( 4*0.39/(1-0.39^4) ) – 4
To calculate derived numbers
Forecasting – Sun Lambda U R Queue
0 start point 85.29 0.39 0.02 -2.40
22% 104.05 0.48 0.02 -1.99
44% 126.95 0.58 0.02 -1.38
66% 154.87 0.71 0.02 -0.22
88% 188.95 0.86 0.04 3.80
110% 230.51 1.05 -0.08 -21.99
132% 281.23 1.29 -0.01 -6.97
154% 343.10 1.57 -0.004 -5.24
176% 418.58 1.91 0.002 -4.62
Case – 8X Dell Linux 16 GB 64
HUGE WEBLOAD simulation
> sar -u 60 20
Linux 2.6.9-34.0.2.ELsmp (nodename) 08/16/2006
08:16:45 AM CPU %user %nice %system %iowait %idle
08:17:45 AM all 67.28 0.00 11.86 3.26 17.60
08:18:45 AM all 66.94 0.00 10.43 4.27 18.36
08:19:45 AM all 64.08 0.01 11.59 5.25 19.07
………
08:34:45 AM CPU %user %nice %system %iowait %idle
08:35:45 AM all 66.76 0.00 13.57 5.24 14.42
08:36:45 AM all 68.75 0.00 14.21 4.05 12.98
Average: all 63.20 0.00 12.54 5.49 18.77
Simulation 98632 hits ~20
minutes
SQL> @ws
Database: 16-AUG-06 01:55pm
Report: ws.sql OSM by OraPub, Inc. Page 1
Web Site Activity
Date Hits
------------ ------------------------
Aug-16 08 98632
Math – CPU Linux
S = 0.217 sec/call ; U = ( S λ ) / M
0.632 = ( S * 23.34 ) / 8
R = 0.223 sec/call ; R = S / (1 - U^M)
R = 0.217 / ( 1 – 0.632^8 )
Q = - 2.812 calls ; Q = ( MU / (1 - U^M) ) – M Q = (
8*0.632/(1-0.632^8) ) – 8
Derived values
Forecasting – Linux (Heavier Load)
Lambda U R Queue
0 start point 23.340 0.632 0.222 -2.812
22% 28.475 0.771 0.248 -0.951
44% 34.739 0.941 0.560 11.448
66% 42.382 1.148 -0.108 -12.571
88% 51.706 1.400 -0.016 -8.814
110% 63.081 1.708 -0.003 -8.191
132% 76.959 2.084 -0.001 -8.047
154% 93.890 2.542 0.000 -8.012
176% 114.546 3.102 0.000 -8.003
Migration Steps – Recommendations
1. Install new Release
Patchset – Different Oracle
Home
2. Create new SID.ini, add to
oratab, oraenv,
$ORACLE_BASE
3. Set TNS_ADMIN, edit
sqlnet.ora, tnsnames.ora,
stop old listener, start new
4. Install/test clients – set
$ORACLE_BASE
1. Gives you a fallback
position, ability to
downgrade
2. Keeps Environment
cleaner
3. Multiple Listeners in
different OH may be a
problem –use 1 home
4. New OH
Forecasting – Linux (Heavier Load)
Lambda U R Queue
0 (start) 23.340 0.632 0.222 -2.812
22% 28.475 0.771 0.248 -0.951
44% 34.739 0.941 0.560 11.448
66% 42.382 1.148 -0.108 -12.571
88% 51.706 1.400 -0.016 -8.814
110% 63.081 1.708 -0.003 -8.191
132% 76.959 2.084 -0.001 -8.047
154% 93.890 2.542 0.000 -8.012
176% 114.546 3.102 0.000 -8.003
Independent Migrations –
Independent Steps
1. Migrate RMAN
Catalog Database to
11g
2. Migrate RMAN
Catalog to 11g*
3. Migrate Grid Control
DB to 11g
Take advantage of new
RMAN functionality via
SQL with 10gR2.
Work with newer features
of 11g.
11g ASM*
• Rolling Upgrades – also for patching
• ASMMigrate (EM utility) – tablespace level
migration
• Convert single to clustered ASM
• Disk Group Compatibility Attributes –
compatible.asm, compatible.rdbms
• New SYSASM role – separated even further in
future releases
• Set $ORACLE_BASE
• Run CSS and ASM instance different OH
11g Diagnosability Framework
• Define ORACLE_BASE for all
clients/processes/utilities - logs, trace, dumps
asm clients crs diagtool lsnrctl netcman ofm
rdbms tnslsnr
• $ORACLE_BASE/db_name/instance_id=$ORACLE
_SID/trace/alert_SID.log
• oradiag_osuser/diag/clients/user_osuser/host
_2603418016_11/trace/sqlnet.log
ADRCI – command-line utility
Easy to script….
set echo on
set homepath
diag/tnslsnr/node/listener_name
purge -age 10080 -type alert
purge -age 10080 -type incident
purge -age 10080 -type trace
purge -age 10080 -type cdump
quit
OUI, OraInventory and CPU’s
• Custom Installation
• Silent vs. Interactive **
• Software Configuration
Manager
• RTO
• RPO
• Optimal Flexible
Architecture
Listener – Pre-Spin
• TNS_ADMIN
• LOCAL_LISTENER
• Non-standard Port (not 1521)
• TCP, BEQ
• Security
RMAN Catalog
Catalog Database - 11g
• Multiple Catalogs
• Multiple Levels of
Security
RMAN Catalog
• Easy to co-locate with
Grid Control Repository
Grid Control Repository Migration
Requirements….
• Start with GC 10.2.0.4 and agents.
• Stop all agents, oms, ias control, opmn
• Use the 11g database upgrade guide
• Optionally – Install into 11g DB, new GC install * -
requires GC 10.2.0.4 (may not be a download
available)
Database Configuration Changes
• RDA will document changes, save history
• Oracle Configuration Manager – latest, not historical
Security Changes in 11g
• Password file – case sensitive issues with
DataGuard in 11gR1 *
• Auditing
• Tablespace Encryption
Characterset Selection/Migration
Implications*
• US7ASCII: better to migrate
to WE8MSWIN1252, or
WE8ISO8859P15 etc.
• WE8ISO8859P1:
WE8MSWIN1252 is a
superset
• UTF8: better to migrate to
AL32UTF8…..etc, etc,etc
Transitional Steps
• Migrate RMAN catalog
database to new
Characterset
• Migrate Grid Control
Repository DB as well
• Other accessory DB‟s…
• New application installation
Migration Methods
• EXP/IMP
• EXPDP/IMPDP
• Transportable Tablespaces *SELECT article
• DBUA
• Oracle 11g Upgrade Companion **extensive doc
• Manual Upgrade
• Transient Logical Standby ***presentation Openworld „08
• Physical Standby
• Snapshot Standby – 11g
What we Learned….
• Set $ORACLE_BASE
• New $ORACLE_HOME
• RMAN Catalog and Database
• Grid Control DB
• Clients
• SQLNET
• ASM
• Manual Upgrade, Custom Install
• Use oraenv, oratab, custom variables