2007IT006.pdf

53
Upgrading Oracle 8i/9i to Gerald L. Jowers, II +1 205 276 6795 +1 205 879 3282-1171 [email protected]

Transcript of 2007IT006.pdf

Page 1: 2007IT006.pdf

Upgrading Oracle 8i/9i to

Gerald L. Jowers, II+1 205 276 6795

+1 205 879 [email protected]

Page 2: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 2

• Why upgrade to Oracle 10g?• What versions are supported?• Which clients are supported by COMMANDseries?• What O/S should I use?• 10g Architecture• Automatic Storage Management (ASM)• Flashback Recovery Area• What hardware configuration should I use?• History of the #• Questions• Upgrade demonstration (9i to 10g, new server)• Oracle Documentation Library• Questions

Overview

Page 3: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 3

Why upgrade to Oracle 10g?

• Most current release of the Oracle database• 64-bit memory addressing• Self-Managing Database

– Automated Statistics Gathering– Automatic Free Space Management– Automatic Workload Repository Segment Space Advisor– SQL Tuning Advisor– SQLAccess Advisor– Automatic Database Diagnostic Monitor

• Enhanced Job Scheduling• Automatic Storage Management (ASM)• New Backup and Recovery Features

– Full Flashback recovery– Enhanced RMAN features

• Enhanced Real Application Clusters• Data Pump• Options: RAC, OEMGC, etc

Page 4: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 4

• At this time the following Oracle server versions (editions) are supported:– Standard, Enterprise or Personal

Releases:• 10.2.0.2.x• 10.2.0.3.x

• Which edition should I use?– Normally you will upgrade to the same edition that you are

using now, in most cases this will be Standard Edition.

• What are the software costs to upgrade to 10g?– As long as you are current with your Oracle maintenance,

there is NO charge (can we say free!) for the new release!

What versions are supported?

Page 5: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 5

What versions are supported?

• Should I change to Enterprise Edt. if I am using Std. Edt.?– Are you going to need more than 4 physical CPU’s (not

cores)? – How many servers do you need/want?– Are you going to need to have a failover site?– Do you want a separate db server for reporting?– Do you have more than one db server/cluster and wish to

use OEM Grid Control to manage them?– Minimum number of users?

Page 6: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 6

Which Oracle clients are supported by COMMANDseries?

• Regardless of the COMMANDseries version the Oracle client is a 32-bit client!

• CS+8 & CS06

– 9.2.0.8– 10.2.0.2– 10.2.0.3

• CS v5.57.x

– 8.1.4.13+*– 9.2.0.8

* No longer supported by Oracle

Page 7: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 7

What O/S should I use for my DB Server?

• The most relevant Oracle database server certifications:

Server Certifications

OS ProductCertified

With Version StatusAddtl. Info.

Components Other

Install Issue

2003 32-bit 10gR2 32-bit N/A N/A Certified Yes None None None2003 R2 AMD64/EM64T 10gR2 64-bit N/A N/A Certified Yes None None None2003 AMD64/EM64T 10gR2 64-bit N/A N/A Certified Yes None None NoneIBM AIX 5L 10gR2 64-bit N/A N/A Certified Yes None None NoneRed Hat Enterprise AS/ES 4 10gR2 64-bit N/A N/A Certified Yes None None NoneRed Hat Enterprise AS/ES 3 10gR2 64-bit N/A N/A Certified Yes None None NoneOracle Enterprise Linux 4 10gR2 64-bit N/A N/A Certified Yes None None NoneSLES-9 10gR2 64-bit N/A N/A Certified Yes None None NoneSLES-10 10gR2 64-bit N/A N/A Certified Yes None None NoneSolaris 8 - SPARC 10gR2 64-bit N/A N/A Certified Yes None None NoneSolaris 9 - SPARC 10gR2 64-bit N/A N/A Certified Yes None None NoneSolaris 10 - SPARC 10gR2 64-bit N/A N/A Certified Yes None None NoneHP-UX PA-RISC 11i v2 (11.23) 10gR2 64-bit N/A N/A Certified Yes None None NoneHP-UX PA-RISC 11i v2 (11.11) 10gR2 64-bit N/A N/A Certified Yes None None None

Page 8: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 8

What O/S should I use for my DB Server?

• CAI recommends 10g be implemented on a 64-bit server O/S– Windows Server 2003 AMD64/EM64T– Linux 64-bit (AMD64/EM64T, IBM POWER, etc)– Solaris– AIX5L– Etc– Which will you choose?

Page 9: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 9

Which O/S, cont’d

• Why do we recommend a 64-bit O/S? Memory is #1

Page 10: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 10

Which O/S, cont’d

• With a 64-bit O/S these memory complications go away

Page 11: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 11

Which O/S, cont’d

• 64-bit server advantages:– Up to 8TB of RAM can be used for Oracle (not that you will

need it for CS)– SGA size is not limited to 1.7-3GB– Much better data processing capabilities– Faster file I/O: 64-bit architecture takes advantage of large

data blocks. Big Oracle Blocks (BOB) allow for 32k block sizes, greatly reducing disk I/O for Oracle index access

– Can handle greater numbers of users on the same equipment as compared to the 32-bit equivalent

– It doesn’t cost any extra!

• Things to be aware of:– Must have the correct 64-bit version of Oracle for the O/S &

processor type– Make sure drivers are available for all hardware you plan to

use for a given O/S

Page 12: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 12

10g RAC Architecture

Page 13: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 13

Automatic Storage Management

• ASM is a storage management system for Oracle data – ASM is designed to simplify DBA storage tasks– Simply assign disks and walk away – no data layout

decisions– Allows Oracle to manage thousands of files automatically– Organizes available disks into disk groups

• ASM extends the power of Oracle Managed Files– Creates and manages files automatically

• Understands different Oracle file types

– Offers built-in data mirroring and striping capabilities– Automatically balances I/O load across disk group(s)– Functionally like an LVM (Logical Volume Manager)

Page 14: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 14

ASM Components

• Disk Groups– Oracle may provide disk mirroring (optional)– Oracle will stripe files across all available disks– Using ASM striping across a group of hardware striped LUNs

can be beneficial to performance– Must use RAW disks

• Disks assigned to ASM Disk groups become ASM Disks

• Files written on ASM disks become ASM files– Files are named with an Oracle-defined format– File name aliases may be defined for convenience– A hierarchical directory structure may be defined for file

aliases

Page 15: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 15

ASM Components

• ASM is implemented through an ASM instance that runs as a service on each node

• ASM Disk Groups may be defined with different levels of redundancy– NORMAL redundancy indicates that Oracle will create a

software mirror for each disk– HIGH redundancy indicates that Oracle will create two

mirror disks per data disk• Disk mirrors may be segregated into different locations by

designating Failure Groups

– EXTERNAL redundancy indicates that Oracle will not create any software mirrors. Hardware mirrors (if any) will be used instead

• External redundancy is recommended for any system with a highly available storage array

Page 16: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 16

ASM File Information• ASM files will be created automatically by Oracle when a new

object is created:– ALTER SYSTEM SET DB_CREATE_FILE_DEST = '+dgroup_01'; – CREATE TABLESPACE CSPROD_DATA_01;

• Note: ASM files are only visible to Oracle through SQL, Grid Control, or OEM– Not visible as an OS level file – looks like a raw device to the OS

• ASM files have the following format:+group/dbname/file_type/file_type_tag.file.incarnationWhere:– +group is the disk group name– dbname is the DB_UNIQUE_NAME of the database– file_type is the Oracle file type– tag is a descriptor appropriate to the file type– file.incarnation is the file/incarnation pair, used to ensure

uniqueness• An example of a fully qualified ASM filename is:

+dgroup_01/oradb/controlfile/CF.248.1

Page 17: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 17

Flashback Recovery Area

• Separate Flashback Area created during database creation (optional)– Contains flashback logs– Contains a full RMAN backup to disk– Should be sized at 1X – 3X database size, depending on log

retention period

• Can quickly restore to any point in time covered within the retention period– Restore the entire database– Restore a single table

• Flashback query– Query a table as it existed at a point in time, without

restoring the table

• Backups can be completely automated

Page 18: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 18

What hardware configuration should I use?

• Generally speaking– 2 Dual Core Processors w/ 2MB+ cache (Intel Xeon or AMD

Opteron)– 4+GB RAM– 1 or more 1Gb/s NIC’s– DVD Drive– Redundant disk drives, SAS, SCSI (preferably 15k), SATA

• The more disks to spread I/O across the better oracle will perform

• 1 or more RAID arrays• SAN - Fiber or iSCSI• Direct Attached storage• Internal storage

– Gigabit Switch(es)

Page 19: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 19

History of the #

# http://en.wikipedia.org/wiki/Hash_sign

One simple character, so many names and uses:Naming convention within the USA• In the United States, the symbol was traditionally called the pound

sign. This derives from a series of abbreviations for pound avoirdupois, which is a unawefawe fawe faweawfaweaweit of mass (although pound awef awefawef awef awis generally used as a unit of weight; for more information, see pound-force and pound (unit of mass)). At first "lb." was used; later, printers got a special font made up of an "lb" with a line through the ascenders so that the "l" would not be mistaken for a "1". Unicode character U+2114 (℔) is caa wefawe faw efaweflled the "LB Bar Symbol," and it is a cursive development of this symbol. Finally came the reduction to two horizontal and two vertical strokes.

• Its traditional commercial use in the U.S. was such that when itfollowed a number, it was to be read as "pawe fawef awefounds", as in 5# of sugar, and when it preceded a number, it was to be read eawefawe fawef awef aweffas 'number', as in #2 pencil. Thus the same character in a printer's type case had two uses.

Page 20: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 20

History of the #, part #2Names in English speaking countries apart from the USA• It has many other names (and uses) in English. (Those in bold are listed as

alternative names in the Unicode documentation.) Here are a few:• comment sign

– from its use in many shell scripts and some programming languages like Perl to introduce comments

• crosshatch– resemblance

• crunch – possibly used by computer programmers [citation needed], alluding to the

combination of # with the "bang" character ! in a shebang, and the symmetry between the big bang and the big crunch in the model universes of cosmology.

• fence, gate, grid, gridlet – resemblance

• hash / hash mark / hash sign – the most common name outside the U.S., including in the UK, Ireland, Australia, and

New Zealand. – Used in Ireland, the UK, Australia, and New Zealand on touch-tone telephones –

"Please press the hash key" – In the UK and Australia the symbol is often used as medical shorthand for 'fracture'

[1][2]– Used among computer professionals. For example, in Unix scripting, it's used in

combination with an exclamation mark to produce a "#!" or "hash-bang," used to tell the kernel which program to use to run the script.

Page 21: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 21

Questions

Page 22: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 22

Upgrade from 9i to 10g Demonstration

Page 23: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 23

Pre-Installation Requirements

Recommended:• Processors:

– EM64T or AMD Opteron processor required for Windows 2003 X64 version or Linux x64 releases

• RAM: 4GB (+ strongly recommended)• Virtual Memory: Initial Size 2xRAM size• 1.5 GB+ storage for Oracle software download• 4.8 GB storage minimum for install• Video Adapter: 256 color support, minimum

• Today’s example will be on 64-bit Windows

Page 24: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 24

Pre-Installation Storage Requirements

• Disk space for both the software install and the database files should be allocated before the Oracle install.

• To manage storage:– Start Administration Tools

Computer Management Disk Management

– Here you can format disks, create partitions, assign drive letters, etc.

– Oracle disks should be formatted as Basic disks, not Dynamic Disks

• Multiple disks presented through RAID hardware may appear as a single “disk” in this interface– It is important to understand the

physical structure that a drive letter actually represents

– It is best to use drives that are composed of multiple disks in a hardware RAID striped disk group.

Page 25: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 25

Pre-Installation Network Requirements

• Remove unused network protocols– Causes excess overhead– Edit your Network Adapter

properties– Uninstall unused protocols

• Use a static IP address, if possible– Select Properties for the TCP/IP

Protocol to edit– Do not use DHCP– IP address, Subnet mask,

Default gateway, and Preferred and Alternate DNS Server addresses are required

– Should be a routable address– DHCP is not supported for

production systems

Page 26: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 26

Pre-Installation Network Requirements

• Edit Adapter and Binding settings– Control Panel -> Network

Settings -> Advanced -> Advanced Settings

– Place the Public NIC first• Oracle uses the

gethostbyname function, which returns the first IP address in the list

– For multiple protocols, place TCP/IP first, typically TCP/IP should be the only protocol

Page 27: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 27

Pre-Installation Network Requirements

• It is important to be able to map server names to IP addresses. There are two ways to do this:– The network administrator can create DNS entries for the

host name– You can create entries in a local hosts file (these entries

should not conflict with the DNS entries)

• To create a local hosts file (required for RAC):– Edit or create the

{drive}\Windows\system32\drivers\etc\hosts file– Add an entry with the IP address, the fully qualified host

name, and the short name aliasEx:127.0.0.1 localhost.localdomain localhost

10.10.10.3 db1.commandalkon.com db1– Make sure the localhost line is entered exactly as shown

above

Page 28: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 28

Pre-Installation Requirements

• Do the following to get the best performance out of the system– Select Adjust for best

Performance

– Select Background Services for Processor Scheduling and Programs for Memory Usage

Page 29: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 29

Pre-Installation Requirements

• Set the TEMP and TMP environment variables to a specific directory.Ex: C:\TEMP

Page 30: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 30

Installation

• Run setup.exe from the Oracle installation:

• Select the Advanced Installation option

Page 31: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 31

Installation

• Select the Installation Type, in this case Standard Edition

• Specify the Oracle Home details. Normally only the drive letter will need to be changed.

Page 32: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 32

Installation

• Verify that all Prerequisite Checks pass

• Select Install database Software only

Page 33: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 33

Installation

• Verify the path, Oracle Home and the products being installed

• Wait for the installer to complete

Page 34: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 34

Installation

• Once the OUI completes exit the installer.

• Go to the 10.2.0.3 staging area and run setup.exe

• Press Next on the Welcome screen of the OUI

Page 35: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 35

Installation

• Specify the correct Oracle Home by pressing on the drop list and selecting the correct home.

☺ Tip – The OUI will default to a new Oracle Home this is not what we want!

• Verify the installation location and the Oracle Home

Page 36: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 36

Installation

• Wait for the OUI to complete the installation

• Once the OUI has completed press Exit

Page 37: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 37

Configuration

• Use the Network Configuration Assistant to create the Oracle LISTENER

• Select Add

Page 38: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 38

Configuration

• Create the Listener with the name: LISTENER

• Select TCP as the Protocol

Page 39: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 39

Configuration

• Use the Standard Port 1521

• Select No, on 99.99% of the systems only a single listener is required

Page 40: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 40

Configuration

• Once the Listener configuration has completed, press Next and then Finish.

• From the menu now select the Database Configuration Assistant (DBCA) to build the db

Page 41: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 41

Configuration

• Select Create Database

• Select Custom Database

Page 42: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 42

Configuration

• Enter the Global Database Name and the SID. Typically this will be the first 8 characters of the server name or following your companies’ naming conventions.

• Select Configure the Database with Enterprise Manager. – Use Grid Control will only be

available if the Oracle Agent is installed.

• Do not select any other options at this time.

Page 43: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 43

Configuration

• Enter in the SYS, SYSTEM, etc passwords. By default they will all be the same.

• While ASM is recommended, in this example we will be using the NTFS file system in this example. This configuration will be fine for most medium to small configurations.

Page 44: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 44

Configuration

• In our example we only have one drive so all files will use these default file locations, please note that it is recommended to have multiple drives. In this case you would want to add additional variables.Ex. ORACLE_DATA D:\oracle\oradata

Page 45: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 45

Configuration

• Select Specify Flash Recovery Area and set the desired size in our example we use 10GB.

• Deselect all options but the Enterprise Manager Repository

Page 46: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 46

Configuration

• In our example we have a small amount of RAM (512MB) so the system required us to use 43%. Normally you would want to select Custom and enter a reasonable SGA and PGA Size these can be changed later.

• On the sizing tab make sure that the Processes is set to a minimum of 500. This is normally 10*(No. of CS users+CMDcomms)*1.10Ex. 100 users & Comms would

need 1100 processes

Page 47: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 47

Configuration

• Select Dedicated Mode

• Create additional redo logs– Min of 5

Page 48: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 48

Configuration

• Create Data Tablespace for CMDseries

• Modify the sizes of the other tablespaces to something similar to below

Page 49: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 49

Configuration

• Save the Scripts and the report of what you selected/configured. Then press Finish to start actually building the db.

• This may take some time depending on the speed of the system.

Page 50: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 50

Configuration

• Once the DBCA has completed a few additional tasks are required:– Set initialization Parameters:

• Verify memory settings• OPEN_CURSORS=3000 or higher• DB_WRITER_PROCESSES=2 can be set higher• PROCESSES=500 or greater (10*(No. of CS users+CMDcomms)*1.10)

• CURSOR_SHARING=FORCE– Create CMDSERIES User(s) use OEM to do this

• Assign correct Data tablespace and Temp tablespace• Assign desired privileges and/or roles

– Make sure the ORA_DBA local users group has the following local security privileges:

• Lock pages in memory• Create global objects• Log on as batch job

Page 51: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 51

Configuration

• There are many other configuration options, we have only touched on the most critical ones.

• Other init settings• Backup and Retention settings• ADDM• Etc.

• For further information contact Command Alkon for further training or see the following:

Page 52: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 52

Oracle Documentation Library

• http://www.oracle.com/pls/db102/homepage

Page 53: 2007IT006.pdf

IT-006 Upgrading Oracle 8i/9i to 10gR2 53

Questions