Академический Документы
Профессиональный Документы
Культура Документы
Preparation
Upgrade
Performance Testing
Best Practices
Preparation
Support Policy
Patches
Upgrade Certification
Documentation
Upgrade paths
News and Task List Installation
Editions
Performance Testing
Best Practices
R2
Sustaining Support
Premier Support Extended Support
July 2007 July 2008 July 2010
R2
t
2005
2010
2015
2002
2003
2004
2006
2007
2008
2009
2011
2012
2013
2014
2016
2017
2018
© 2009 Oracle Corporation 5
http://www.oracle.com/support/library/brochure/lifetime-support-technology.pdf
Lifetime Support Policy
Feature Premier Extended Sustaining
Support Support Support
Major Product and Technology Releases
Technical Support
Access to Knowledge Base
(MetaLink/Customer Connection/SupportWeb)
Upgrade Scripts No
12%
≥≥ 7.3.4
7.3.4 9.2.0.8
9.2.0.8
R2
R2
≥≥ 9.2.0.4
9.2.0.4
≥≥ 8.0.6
8.0.6
R2
R2
≥≥ 8.1.7.4
8.1.7.4
10.1.0.5
10.1.0.5
≥≥ 9.0.1.4
9.0.1.4 ≥≥ 10.2.0.2
10.2.0.2
R2
R2
"Empty" arrows mean: no specific patch release required
• Note: 401705.1 Linux x86, x86-64, and s390x Requirements Reference List
http://download.oracle.com/docs/cd/B28359_01/server.111/b28300/toc.htm
• Note:429825.1
Complete Checklist for Manual Upgrades to 11gR1
• Note: 421191.1
Complete checklist for manual upgrades from X to Y
UPGRADE
UPGRADE
Export/Import
Export/Import
N
N Stay
Stay on
on same
same OS?
OS? Y
Y
CTAS,
CTAS, COPY
COPY
N
N Downtime
Downtime >45min?
>45min?
SQL
SQL Apply
Apply
Y
Y
Oracle
Oracle Streams
Streams
DBUA
DBUA
Transportable
Transportable Tablespaces
Tablespaces
O
OR
CLI
CLI
RAAC
CLLEE
rreecco SQL> @catupgrd
Transportable
Transportable Database
Database ommm
meenn
ddeed
d
• Or in / :
SQL>
SQL> EXECUTE
EXECUTE dbms_stats.gather_dictionary_stats;
dbms_stats.gather_dictionary_stats;
• Windows:
• Rename oradv10.dll in ORACLE_HOME\bin
• Upon restart: $$ dvca
dvca -action
-action disable
disable ...
...
• After upgrading relink with dv_on or rename the DLL and enable
Database Vault again:
$$ dvca
dvca -action
-action enable
enable ...
...
• RAM: ≥ 1GB
• Swapspace
• RAM up to 2048Mb → 1.5x RAM
• RAM between 2049Mb and 8192Mb → 1x RAM
• RAM more than 8192Mb → 0.75x RAM
• http://edelivery.oracle.com/
• http://download.oracle.com/docs/cd/B28359_01/install.111/b32006/reqs.htm#sthref291
Important:
Important:
„CUSTOM“
„CUSTOM“ ALWAYS
ALWAYS installs
installs
Enterprise
Enterprise Edition
Edition
Preparation
Upgrade
Database Upgrade Assistant
Command Line Upgrade
News and Task List Post Upgrade
Alternatives
CRS Upgrade
Diagnostics & Tuning ASM Upgrade
Migration
Performance Testing
Best Practice
• Logs:
• $ORACLE_HOME/cfgtoollogs/dbua
• Documentation:
• Oracle® Database Upgrade Guide
http://download.oracle.com/docs/cd/B28359_01/server.111/b28300/toc.htm
• Example:
From
From 11g
11g
on
on always
always
SECURE
SECURE
Preparation
Upgrade
Database Upgrade Assistant
Command Line Upgrade
News and Task List Post Upgrade
Alternatives
CRS Upgrade
Diagnostics & Tuning ASM Upgrade
Migration
Performance Testing
Best Practice
Server(OLD)
Server(NEW)
• DST (Daylight Savings Time) patches for Version V4 have to be
applied as a requirement for the upgrade to Oracle Database 11g
• REGISTRY$DATABASE ==> TZ_VERSION=4
© 2009 Oracle Corporation 90
Command Line Upgrade
• utlu111i.sql: Tablespaces adequate size?
• Annotation:
You'll have to install all options installed for the release you are
upgrading from – otherwise some components can’t be upgraded
• Ideally include
the Companion-CD's
"Oracle Database Products"
in all installations:
SQL>
SQL> STARTUP
STARTUP UPGRADE;
UPGRADE;
• Useful:
SQL>
SQL> SPOOL
SPOOL c:\temp\upgrade.log
c:\temp\upgrade.log
2.
2. Query
Query returning
returning the
the number
number ofof objects
objects compiled
compiled so
so far.
far.
This
This number
number should
should increase
increase with
with time.
time.
SELECT
SELECT COUNT(*)
COUNT(*) FROM
FROM UTL_RECOMP_COMPILED;
UTL_RECOMP_COMPILED;
3.
3. Query
Query showing
showing jobs
jobs created
created by
by UTL_RECOMP.
UTL_RECOMP.
SELECT
SELECT job_name
job_name FROM
FROM dba_scheduler_jobs
dba_scheduler_jobs
WHERE
WHERE job_name
job_name like
like 'UTL_RECOMP_SLAVE_%';
'UTL_RECOMP_SLAVE_%';
4.
4. Query
Query showing
showing UTL_RECOMP
UTL_RECOMP jobs
jobs that
that are
are running.
running.
SELECT
SELECT job_name
job_name FROM
FROM dba_scheduler_running_jobs
dba_scheduler_running_jobs
WHERE
WHERE job_name
job_name like
like 'UTL_RECOMP_SLAVE_%';
'UTL_RECOMP_SLAVE_%';
Oracle
Oracle Database
Database 11.1
11.1 Post-Upgrade
Post-Upgrade Status
Status Tool
Tool 05-06-2009
05-06-2009 11:23:33
11:23:33
Component
Component Status
Status Version
Version HH:MM:SS
HH:MM:SS
Oracle
Oracle Server
Server VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:16:17
00:16:17
JServer
JServer JAVA
JAVA Virtual
Virtual Machine
Machine VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:05:19
00:05:19
Oracle
Oracle Workspace
Workspace Manager
Manager VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:01:01
00:01:01
Oracle
Oracle Enterprise
Enterprise Manager
Manager VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:10:13
00:10:13
Oracle
Oracle XDK
XDK VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:00:48
00:00:48
Oracle
Oracle Text
Text VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:00:58
00:00:58
Oracle
Oracle XML
XML Database
Database VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:04:09
00:04:09
Oracle
Oracle Database
Database Java
Java Packages
Packages VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:00:33
00:00:33
Oracle
Oracle Multimedia
Multimedia VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:07:43
00:07:43
Oracle
Oracle Expression
Expression Filter
Filter VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:00:18
00:00:18
Oracle
Oracle Rule
Rule Manager
Manager VALID
VALID 11.1.0.7.0
11.1.0.7.0 00:00:12
00:00:12
Gathering
Gathering Statistics
Statistics 00:04:53
00:04:53
Total
Total Upgrade
Upgrade Time:
Time: 00:52:31
00:52:31
Preparation
Upgrade
Database Upgrade Assistant
Command Line Upgrade
News and Task List Post Upgrade
Alternatives
CRS Upgrade
Diagnostics & Tuning ASM Upgrade
Migration
Performance Testing
Best Practice
or:
SQL>
SQL> create
create pfile pfile from
from spfile;
spfile;
Now
Now edit
edit init.ora
init.ora with
with an
an editor:
editor:
SQL>
SQL> startup
startup force force pfile=initDB.ora
pfile=initDB.ora
SQL>
SQL> create
create spfilespfile from
from pfile;
pfile;
SQL>
SQL> select
select pname
pname NAME,
NAME, pval1
pval1 VALUE,
VALUE, pval2
pval2 INFO
INFO
from
from aux_stats$;
aux_stats$;
NAME
NAME VALUE
VALUE INFO
INFO
-------------------- ---------- ------------------------------
-------------------- ---------- ------------------------------
STATUS
STATUS COMPLETED
COMPLETED
DSTART
DSTART 04-03-2008
04-03-2008 12:30
12:30
DSTOP
DSTOP 05-03-2008
05-03-2008 12:30
12:30
FLAGS
FLAGS 11
CPUSPEEDNW
CPUSPEEDNW 1392,39
1392,39
IOSEEKTIM
IOSEEKTIM 11,405
11,405
IOTFRSPEED
IOTFRSPEED 25595,605
25595,605
...
...
• Otherwise it can happen that MMON will cause too much CPU load
Preparation
Upgrade
Database Upgrade Assistant
Command Line Upgrade
News and Task List Post Upgrade
Alternatives
CRS Upgrade
Diagnostics & Tuning ASM Upgrade
Migration
Performance Testing
Best Practice
• Export performance
• DIRECT=Y ... bypasses SQL-Layer, but no conversions!
• Parallelize export by dividing into logical independent chunks of data
• Import performance
• Increase BUFFER
• INDEXES=N ... build indexes later in parallel ... INDEXFILE=...
• Parameter COMMIT_WRITE=NOWAIT (10g) or
COMMIT_WAIT=NOWAIT (11g) during import
• Pros&Cons:
+ "Can be" extremely fast
- SYSTEM+SYSAUX tablespaces won't get transported - so additional
tasks are required to get views, synonyms etc. moved into the new
database
- Full backup necessary afterwards
• Cases and White Papers on OTN:
• Amadeus Customer Case
http://www.oracle.com/technology/deploy/availability/pdf/AmadeusProfile_TTS.pdf
• For TTS White Papers see the MAA webpage:
http://www.oracle.com/technology/deploy/availability/htdocs/maa.htm
Read Only
Copy datafiles
exp meta data
imp meta data
Read Write
10.2.0.4 11.1.0.7
Source DB Target DB
Create new
Import non-segment
user data (views etc.)
Transport
• Pros&Cons:
+ Operation in parallel
+ Possibility of changing the platform environment
- Logminer has some datatype restrictions
- Effort is relatively high and source db must be at least 9.2
• Pros&Cons:
+ Downtime ~2min for both switchovers
- No changes of the OS platform possible
- Logminer has some datatype restrictions
- Some effort to setup and prod must be at least 10.1.0.3
+ But beginning with 11g:
Transient Logical Standby utilizes an existing Physical
Standby database for the rolling upgrade process
Clients Redo
P L Log P L
ARCH
Redo Redo
Upgrade L P P L
Upgrade
Upgrade with
with DBUA
DBUA
synchronize
FLASHBACK
DATABASE TO: SWITCHOVER
LSTBY PROD
Guaranteed
Guaranteed
Restore
Restore Point
Point
New
New $OH
$OH
Upgrade via
PSTBY Logshipping:
synchronize
SWITCHOVER
PROD PSTBY
t t
© 2009 Oracle Corporation 125
Agenda
Preparation
Upgrade
Database Upgrade Assistant
Command Line Upgrade
News and Task List Post Upgrade
Alternatives
CRS Upgrade
Diagnostics & Tuning ASM Upgrade
Migration
Performance Testing
Best Practices
Preparation
Upgrade
Database Upgrade Assistant
Command Line Upgrade
News and Task List Post Upgrade
Alternatives
CRS Upgrade
Diagnostics & Tuning ASM Upgrade
Migration
Performance Testing
Best Practices
Preparation
Upgrade
Database Upgrade Assistant
Command Line Upgrade
News and Task List Post Upgrade
Alternatives
CRS Upgrade
Diagnostics & Tuning ASM Upgrade
Migration
Performance Testing
Best Practices
• Pros&Cons:
+ Only 1 minute downtime for a complete platform migration
+ Simple to setup
+ For Oracle 9.2.0.7+8 and 10.2.0.2+3+4:
HP-PA 11.23
HP-IA64
+ Since Oracle 11g: Win
Linux
• For supported combinations see: Note:413484.1
http://www.oracle.com/technology/deploy/availability/pdf/maa_wp_10gr2_asmmigrationwithdg.pdf
• Option 3: Manual
• Install Cluster Ready Services (CRS) software
• Install Oracle RAC software (or link with RAC option)
• Reconfigure database to accommodate RAC settings
• @$ORACLE_HOME/rdbms/admin/catclust.sql
• init.ora
• Register instances with srvctl
• See an example:
• http://www.oracle.com/technology/pub/articles/chan_sing2rac_install.html
Preparation
Upgrade
COMPATIBLE
COMPATIBLE == 10.0/1/2.0
10.0/1/2.0
COMPATIBLE
COMPATIBLE == 11.0.0
11.0.0
COMPATIBLE
COMPATIBLE ≥≥ 10.1/2.0
10.1/2.0
select
select count(*)
count(*) from
from v$active_session_history;
v$active_session_history;
==> 00 rows
==> rows
MEMORY_MAX_TARGET
SGA_MAX_SIZE
MEMORY_TARGET
SGA_TARGET PGA_AGGREGATE_TARGET
Created
Created in:
in:
• Very helpful:
Check view for default passwords: DBA_USERS_WITH_DEFPWD
Preparation
Upgrade
The Resource Manager process is responsible for setting Resource Plans and other Resource Manager
DBRM related tasks.
ALL
The process archives historical rows for tracked tables into flashback data archives and manages the
FBDA flashback archives.
ALL.
Provides transparent support for XA global transactions in a RAC environment. The database
GTX0-j autotunes the number of these processes based on the workload of XA global transactions.
RAC only
ASM, spawned on
MARK Marks ASM Allocation Units as stale following a missed write to an offline disk.
demand.
The RAC Management Processes perform manageability tasks for RAC, e.g. creation of RAC related
RMSn resources when new instances are added to the clusters
RAC only
In a RACenvironment, this process manages background slave process creation and communication on
RMSN remote instances. These background slave processes perform tasks on behalf of a coordinating process RAC only
running in another instance.
SMCO / The space management coordinator process coordinates the execution of various space management
ALL (optional non-
related tasks, such as proactive space allocation and space reclamation. It dynamically spawns slave
fatal)
Wnnn processes (Wnnn) to implement the task.
?
The Virtual Keeper of TiMe is responsible for providing a Wall-Clock time (updated every second) and
VKTM Reference-Time Counter (updated every 20ms and available only when running at elevated priority).
ALL
Preparation
Upgrade
R2 GRANTEE
GRANTEE PRIVILEGE
PRIVILEGE
-----------------------
----------------------- -------------------
-------------------
CONNECT
CONNECT CREATE
CREATE SESSION
SESSION
NAME
NAME BYTES
BYTES RES
RES
-------------------------------- ---------- ---
-------------------------------- ---------- ---
Fixed
Fixed SGA
SGA Size
Size 1266372
1266372 No
No
Redo
Redo Buffers
Buffers 2924544
2924544 No
No
Buffer
Buffer Cache
Cache Size
Size 16777216
16777216 Yes
Yes
Shared Pool Size
Shared Pool Size 83886080 Yes
83886080 Yes
Large Pool Size
Large Pool Size 00 Yes
Yes
Java Pool Size
Java Pool Size 50331648 Yes
50331648 Yes
Streams
Streams Pool
Pool Size
Size 00 Yes
Yes
Granule
Granule Size
Size 4194304
4194304 No
No
Maximum SGA Size
Maximum SGA Size 155189248 No
155189248 No
Startup overhead in Shared Pool
Startup overhead in Shared Pool 29360128
29360128 No
No
Free SGA Memory Available
Free SGA Memory Available 00
SUM(SAL)
SUM(SAL) DEPTNO
DEPTNO SUM(SAL)
SUM(SAL) DEPTNO
DEPTNO
----------
---------- ----------
---------- ----------
---------- ---------
---------
8750
8750 10
10 9400
9400 30
30
10875
10875 20
20 10875
10875 20
20
9400
9400 30
30 8750
8750 10
10
or:
• Workaround:
• Set "_optimizer_join_elimination_enabled"=false
• Disable the fix for bug 6167716 eg:
Set "_FIX_CONTROL"='6167716:OFF'
• Basic: All files required to run OCI, OCCI, and JDBC-OCI applications (46 MB)
• JDBC Supplement: Additional support for XA, Internationalization, and RowSet operations under JDBC (1.5 MB)
• SQL*Plus: Additional libraries and executable for running SQL*Plus with Instant Client (0.8 MB)
• SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client (1 MB)
• ODBC: Additional libraries for enabling ODBC applications (0.7 MB)
• WRC: Workload Replay Client used to replay workload for RAT's DB Replay Feature (6 KB)
• ´Precompiler: Additional files for "proc" binary and related files to precompile a Pro*C application and demo (0.5 MB)
Database Release
11.1.0 10.2.0 10.1.0 9.2.0 9.0.1 8.1.7
11.1.0
C
l
10.2.0
i 10.1.0
e 9.2.0
n 9.0.1
t
8.1.7
Certified Supported but ES
Not supported anymore Never supported
• EE SE see Note:139642.1
• Only Export/Import with exp/imp or expdp/imdp will be
supported
• XE SE/SEone/EE
• http://download.oracle.com/docs/cd/B28359_01/server.111/b28300/intro.htm#BABGDCDD
Preparation
Upgrade
• Key-Features:
• PL/SQL development and debugging
• Extremely fast object browser
• Excellent reporting capabilities
• Supports Oracle 9iR2 and above
• Migration workbench for:
• MS SQL-Server
• MS Access
• MySQL
• No extra license costs!
expdp
expdp system/manager
system/manager
DUMPFILE=DATA_PUMP_DIR:full%u.dmp
DUMPFILE=DATA_PUMP_DIR:full%u.dmp
FULL=y
FULL=y NOLOGFILE=y
NOLOGFILE=y
• Attach:
Preparation
Upgrade
High
Watermark
High
Watermark
• Online
• Indexes are maintained
• Triggers won't be executed
• But: TS must be ASSM
• Exclusive Table Lock for HWM
ALTER
ALTER TABLE
TABLE <tablename>
<tablename> SHRINK
SHRINK SPACE;
SPACE;
Preparation
Upgrade
• Disadvantages of LONG:
• Maximum number of LONG columns per table : 1
• No replication possible with LONG und LONG RAW
• Attention:
• LONG LOB conversion is irreversible
CREATE
CREATE TABLE
TABLE t2
t2 (( aa CLOB
CLOB ENCRYPT
ENCRYPT USING
USING 'AES128')
'AES128')
LOB(a)
LOB(a) STORE
STORE AS
AS SECUREFILE
SECUREFILE (CACHE);
(CACHE);
• Tablespace must be ASSM managed
• API access:
PL/SQL (DBMS_LOB), JDBC, .NET, PHP, ...
Preparation
Upgrade
• Flashback Table
• Flashback Database
Has to be enabled
Flashback Logs
• Example:
• select * from EMP as of timestamp ...
• Annotation:
• Maintains indexes, takes care on constraints
• Triggers are disabled
• Afterwards statistics will be stale
• Purpose:
• Recover deleted tables with their dependent objects
• Example:
> flashback table EMP to before drop;
• Annotation:
Flashback logs have to be in the flash recovery area
500
Time in minutes
Restore
400
Recovery
300
250 Flashback
200
114
100
51
2 3 4 6
0
10 GB 100 GB 1 TB 10 TB
Database size
SQL>
SQL> STARTUP
STARTUP FORCE
FORCE
$$ ps
ps -ef
-ef || grep
grep fbda
fbda
Preparation
Upgrade
• No panic:
• Files are still kept also in text mode
• There are two very comfortable interfaces:
• adrci
• EM interface
• Error categories
• Problem (Critical error like ORA-600, ORA-7445, ORA-4031 ...)
• Incident (Singular error - if it gets raised more often it'll become a
PROBLEM!!)
NAME
NAME WERT
WERT
-----------------------
----------------------- ----------------------------------------
----------------------------------------
Diag
Diag Enabled
Enabled TRUE
TRUE
ADR
ADR Base
Base c:\oracle
c:\oracle
ADR
ADR Home
Home c:\oracle\diag\rdbms\source\source
c:\oracle\diag\rdbms\source\source
Diag
Diag Trace
Trace c:\oracle\diag\rdbms\source\source\trace
c:\oracle\diag\rdbms\source\source\trace
Diag
Diag Alert
Alert c:\oracle\diag\rdbms\source\source\alert
c:\oracle\diag\rdbms\source\source\alert
Diag
Diag Incident
Incident c:\oracle\diag\rdbms\source\source\incid
c:\oracle\diag\rdbms\source\source\incid
Diag
Diag Cdump
Cdump c:\oracle\diag\rdbms\source\source\cdump
c:\oracle\diag\rdbms\source\source\cdump
Health
Health Monitor
Monitor c:\oracle\diag\rdbms\source\source\hm
c:\oracle\diag\rdbms\source\source\hm
Default
Default Trace
Trace File
File c:\oracle\diag\rdbms\source\source\trace
c:\oracle\diag\rdbms\source\source\trace
Active
Active Problem
Problem Count
Count 11
Active
Active Incident
Incident Count
Count 77
Copyright
Copyright (c)
(c) 1982,
1982, 2007,
2007, Oracle.
Oracle. All
All rights
rights reserved.
reserved.
ADR
ADR base
base == "c:\oracle"
"c:\oracle"
adrci>
adrci> help
help
Preparation
Upgrade
Free Space
uncompressed
compressed
Space
MB
Table Scans
0.4
0.3
DML Performance
(seconds)
Time
0.2 40
3x Savings
(seconds)
30
0.1
Time
20
0
10
2.5x faster
0
< 3% overhead