Вы находитесь на странице: 1из 44

<Insert Picture Here>

11gR2

Oracle CIS


Database Upgrade Assistant (DBUA)
Post Upgrade


(+)

(-)

Oracle Database
Upgrade Assistant
(GUI)


(CLI)



Oracle 5/6

SQL*Plus CTAS

Database Upgrade Assistant (GUI)


:



(RAC)
/
Express Edition

:
$ORACLE_HOME/cfgtoollogs/dbua

:
Oracle Database Upgrade Guide
11.1:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28300/toc.htm
11.2:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10819/toc.htm

Database Upgrade Assistant (GUI)


Silent mode:
$ dbua help
. :
11.1: http://download.oracle.com/docs/cd/B28359_01/server.111/b28300/upgrade.htm
11.2: http://download.oracle.com/docs/cd/E11882_01/server.112/e10819/upgrade.htm#UPGRD12405

Database Upgrade Assistant (GUI)


dbua [ -silent ] [ -sid SID ] [-oracleHome home_name]
[-oracleBase base_name] [-diagnosticDest diagnostic_destination]
[-sysDBAUserName SYSDBA_user] [-sysDBAPassword SYSDBA_pwd]
[-upgradeASM] [-autoextendFiles] [-newGlobalDbName db_name]
[-newSid new_SID] [-generateMapFile] [-useASM]
[-commonFileLocation common_files] [-omfLocation omf_area]
[-databaseMapFile map_file_name] [-newRecoveryArea recover_area]
[-newRecoveryAreaSize recover_size] [-apexAdminPassword apex_pwd]
[-disableUpgradeScriptLogging ] [-backupLocation directory]
[-sysauxTablespace -datafileName name -datafileSize size
-datafileSizeNext size -datafileSizeMax size]
[-postUpgradeScripts script [, script ] ... ]
[-initParam parameter=value [, parameter=value ] ... ]
[-disableArchiveLogMode] [-recompile_invalid_objects true | false]
[-degree_of_parallelism cpu_number]
[-emConfiguration {CENTRAL|LOCAL|ALL|NOBACKUP|NOEMAIL|NONE}
-dbsnmpPassword password -sysmanPassword password
-asmPassword password -hostUserName hostname
-hostUserPassword password -backupSchedule hh:mm
[-smtpServer server_name -emailAddress address]
[-centralAgent location] [-localRacSid SID]]
[-recoveryAreaDestination directory]
[-h|-help]

Database Upgrade Assistant (GUI)


:
dbua -silent -sid dwh
-oracleHome /opt/oracle/product/RDBMS10g
-diagnosticDest /opt/oracle/diag
-sysDBAUserName sys
-sysDBAPassword manager
-recompile_invalid_objects true
-degree_of_parallelism 4

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

10

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

11

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

12

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

13

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

14

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

15

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

16

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

17

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

19

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

20

Database Upgrade Assistant (GUI)

2011 Oracle Corporation

21

Database Upgrade Assistant (DBUG)


Post Upgrade

Post Upgrade Best Practice - SPFILE


init.ora SPFILE
upgrade
SPFILE ! !

SQL> create pfile from spfile;


<<Now edit init.ora with any editor>>
SQL> startup force pfile=initDB.ora
SQL> create spfile from pfile;

Post Upgrade time zone


DBUA
startup upgrade
exec dbms_dst.begin_upgrade(new_version => 11);
shutdown immediate;
startup;
set serveroutput on;
declare
num_of_failures number;
begin
dbms_dst.upgrade_database(num_of_failures);
dbms_output.put_line(num_of_failures);
dbms_dst.end_upgrade(num_of_failures);
dbms_output.put_line(num_of_failures);
end;
/



:
SQL> EXECUTE dbms_stats.gather_system_stats('start');
<< Run it for several hours on a workload does not generate overhead!!! >>

SQL> EXECUTE dbms_stats.gather_system_stats('stop');


SQL> select pname NAME, pval1 VALUE, pval2 INFO
from aux_stats$;
NAME
VALUE INFO
-------------------- ---------- -----------------------------STATUS
COMPLETED
DSTART
04-03-2010 12:30
DSTOP
05-03-2010 12:30
FLAGS
1
CPUSPEEDNW
2498,65
IOSEEKTIM
11,405
IOTFRSPEED
25595,605
...

Database Upgrade Assistant (DBUG)


Post Upgrade


UPGRADE
Export/Import
N

Same OS?

CTAS, COPY
N

Downtime >30min?

SQL Apply
Y
Oracle Streams

DBUA
Transportable Tablespaces

CLI
Transportable Database
Oracle Golden Gate

SQL> @catupgrd


UPGRADE
Export/Import
N

Same OS?

CTAS, COPY
N

Downtime >30min?

SQL Apply
Y
Oracle Streams

DBUA
Transportable Tablespaces

CLI
Transportable Database
Oracle Golden Gate

SQL> @catupgrd


Database Upgrade Assistant (DBUA)
CLU (catupgrd.sql)
30 90 .

Component

HH:MM:SS

Component

HH:MM:SS

Oracle Server

00:16:17

Oracle Server

00:16:17

JServer JAVA Virtual Machine

00:05:19

JServer JAVA Virtual Machine

00:05:19

Oracle Workspace Manager

00:01:01

Oracle XDK

00:00:48

Oracle Enterprise Manager

00:10:13

Oracle Text

00:00:58

Oracle XDK

00:00:48

Oracle XML Database

00:04:09

Oracle Text

00:00:58

Oracle Database Java Packages

00:00:33

Oracle XML Database

00:04:09

Oracle Database Java Packages

00:00:33

Oracle Multimedia

00:07:43

Oracle Expression Filter

00:00:18

Oracle Rule Manager

00:00:12

Gathering Statistics

00:04:53

Gathering Statistics

00:02:43

Total Upgrade Time: 00:52:31

Total Upgrade Time: 00:30:47


UPGRADE
Export/Import
N

Same OS?

CTAS, COPY
N

Downtime >30min?

SQL Apply
Y
Oracle Streams

DBUA
Transportable Tablespaces

CLI
Transportable Database
Oracle Golden Gate

SQL> @catupgrd

-
11.2.0.2

6.0.36

Source DB

$ exp FULL=Y

Dump File Transfer

Create new

$ imp FULL=Y

Dest. DB

Oracle V5

"exp 11g

"imp"
dump-

,
:

Data Pump
" exp/imp Oracle Database 10g
exp/imp
exp/imp
EXCLUDE
COMPRESS=ALL (Advanced Compression Option )
.

Data Pump NETWORK_LINK


11.2.0.2

10.2.0.4

Source DB

Create new

Database Link
<< TRANSFER >>
$ impdp FULL=Y
$ impdp USER=abc
$ impdp ...

Dest. DB

Data Pump
Data Pump database link
: NETWORK_LINK
impdp
expdp
(IO)
:
:
$ impdp system/pw NETWORK_LINK=mydblink FULL=Y


UPGRADE
Export/Import
N

Same OS?

CTAS, COPY
N

Downtime >30min?

SQL Apply
Y
Oracle Streams

DBUA
Transportable Tablespaces

CLI
Transportable Database
Oracle Golden Gate

SQL> @catupgrd


UPGRADE
Export/Import
N

Same OS?

CTAS, COPY
N

Downtime >30min?

SQL Apply
Y
Oracle Streams

DBUA
Transportable Tablespaces

CLI
Transportable Database
Oracle Golden Gate

SQL> @catupgrd

Transportable Database
Oracle Database 10g Release 2
Cross-platform
cross-Endianness!
READ ONLY


RMAN
RMAN CONVERT DATABASE

Transportable Tablespaces
TTS x-platform (v$transportable_platform):

Little Endian
HP Open VMS
HP Tru64 UNIX
Linux IA (32-bit)
Linux IA (64-bit)
Linux 64-bit for AMD

FILE
COPY

Microsoft Windows IA (64-bit)


Microsoft Windows 64-bit for AMD
Microsoft Windows IA (32-bit)
Solaris Operating System (x86)

2011 Oracle Corporation

RMAN
c
o
n
v
e
r
t

Big Endian
FILE

Apple Mac OS

COPY

HP-UX (64-bit)
HP-UX IA (64-bit)

AIX-Based Systems (64-bit)


IBM zSeries Based Linux
IBM Power Based Linux
Solaris[tm] OE (32-bit)
Solaris[tm] OE (64-bit)

40

Upgrade Alternatives
UPGRADE
Export/Import
N

Same OS?

CTAS, COPY
N

Downtime >30min?

SQL Apply
Y
Oracle Streams

DBUA
Transportable Tablespaces

CLI
Transportable Database
Oracle Golden Gate

SQL> @catupgrd

Upgrade Alternatives
UPGRADE
Export/Import
N

Same OS?

CTAS, COPY
N

Downtime >30min?

SQL Apply
Y
Oracle Streams

DBUA
Transportable Tablespaces

CLI
Transportable Database
Oracle Golden Gate

SQL> @catupgrd

Oracle GoldenGate

(TTS)
GoldenGate

<Insert Picture Here>


Oracle

Email: Igor.Melnikov@oracle.com
Phone: +7 (495) 641 14 00
Direct:
+7 (495) 641 14 42
Mobile: +7 (915) 205 26 27