在Redhat5.6环境下安装9i,并升级到10.2.0.1、10.2.0.4、11R2的过程

Oracle9i升级到11gR2

 

前期准备工作

将虚拟机redhat 5.6 32bit安装好,并将所需要的软件挂载到虚拟机。

第一部分9i环境安装

安装oracle 9i软件

根据升级要求 9i的数据库要升级到9.2.0.4或者更高版本才可以升级到10g

安装9.2.0.4步骤如下:

1 禁用防火墙和selinux

[root@localhost ~]# cat /etc/selinux/

cat: /etc/selinux/: Is a directory

[root@localhost ~]# cat /etc/selinux/config

config config,v

[root@localhost ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

# enforcing - SELinux security policy is enforced.

# permissive - SELinux prints warnings instead of enforcing.

# disabled - SELinux is fully disabled.

SELINUX=disabled

# SELINUXTYPE= type of policy in use. Possible values are:

# targeted - Only targeted network daemons are protected.

# strict - Full SELinux protection.

SELINUXTYPE=targeted

[root@localhost ~]# service ipstable status

ipstable: unrecognized service

[root@localhost ~]# service iptables status

Firewall is stopped.

2 检查安装包

[root@localhost ~]# rpm -qa | grep libXpm-3.5.5-3

libXpm-3.5.5-3

[root@localhost ~]# rpm -qa | grep libXpm-devel-3.5.5-3

libXpm-devel-3.5.5-3

[root@localhost ~]# rpm -qa | grep libXp-1.0.0-8

libXp-1.0.0-8.1.el5

[root@localhost ~]# rpm -qa | grep libXp-devel-1.0.0-8

libXp-devel-1.0.0-8.1.el5

[root@localhost ~]# rpm -qa | grep compat-binutils

[root@localhost ~]# rpm -qa | grep compat-libcwait

[root@localhost ~]# rpm -qa | grep compat-libstdc++-egcs

[root@localhost ~]# rpm -qa | grep openmotif

openmotif22-2.2.3-18

openmotif-devel-2.3.1-5.el5_5.1

openmotif-2.3.1-5.el5_5.1

[root@localhost ~]# rpm -qa | grep compat-oracle

[root@localhost ~]#

 

[root@localhost 9iinstall]# rpm -ivh compat-binutils215-2.15.92.0.2-24.i386.rpm

Preparing... ########################################### [100%]

1:compat-binutils215 ########################################### [100%]

 

[root@localhost 9iinstall]# rpm -ivh compat-libcwait-2.1-1.i386.rpm

Preparing... ########################################### [100%]

cat: /etc/ld.so.preload: No such file or directory

1:compat-libcwait ########################################### [100%]

[root@localhost 9iinstall]# rpm -ivh compat-libstdc++-egcs-1.1.2-1.i386.rpm

Preparing... ########################################### [100%]

1:compat-libstdc++-egcs ########################################### [100%]

[root@localhost 9iinstall]# rpm -ivh openmotif21-2.1.30-11.EL5.i386.rpm

Preparing... ########################################### [100%]

1:openmotif21 ########################################### [100%]

[root@localhost 9iinstall]# rpm -ivh compat-oracle-el5-1.0-5.i386.rpm

Preparing... ########################################### [100%]

1:compat-oracle-el5 ########################################### [100%]

 

 

 

 

3 设置内核参数

[root@localhost 9iinstall]# sysctl -p

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 4294967295

kernel.shmall = 268435456

kernel.sysrq = 0

kernel.core_uses_pid = 1

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

4 设置pam shell limit认证

添加下面的内容,使shell limit生效:

vi /etc/pam.d/login

session required /lib/security/pam_limits.so

 

 

vi /etc/security/limits.conf

 

oracle hard nofile 65536

oracle soft nofile 65536

oracle hard nproc 16384

oracle soft nproc 16384

 

5 设置profile

6 创建用户和组

groupadd oinstall

groupadd dba

useradd oracle -g oinstall -G dba

passwd oracle

 

7 创建相关文件夹

mkdir /opt/oracle

mkdir /opt/oracle/product

mkdir -p /opt/oracle/product/9.2.0

chown -R oracle.oinstall /opt/oracle

chmod -R 755 /opt/oracle/

 

8 设置环境变量

[oracle@localhost ~]$ vim .bash_profile

 

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

 

# User specific environment and startup programs

 

PATH=$PATH:$HOME/bin

 

export PATH

export ORACLE_BASE=/opt/oracle

export ORACLE_HOME=/opt/oracle/product/9.2.0

export ORACLE_SID=demo

export ORACLE_TERM=xterm

#export NLS_LANG=american_america.ZHS16GBK;

export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

export PATH=$PATH:$ORACLE_HOME/bin;

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib

export LANG=en_US

".bash_profile" 23L, 643C written

[oracle@localhost ~]$ . .bash_profile

 

9 安装9i图解

[oracle@localhost Disk1]$ ./runInstaller

[oracle@localhost Disk1]$

[oracle@localhost Disk1]$ Initializing Java Virtual Machine from /tmp/OraInstall2013-01-17_11-00-05AM/jre/bin/java. Please wait...

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding

Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding

Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding

Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding

Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding

Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type VirtualBinding

Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding

 

 

[root@localhost 9iinstall]# cd /tmp/

[root@localhost tmp]# . or

orainstRoot.sh orbit-root/

[root@localhost tmp]# . orainstRoot.sh

Creating Oracle Inventory pointer file (/etc/oraInst.loc)

Changing groupname of /opt/oracle/oraInventory to dba.

 

 

 

 

 

 

 

 

 

 

[root@localhost 9iinstall]# cd /tmp/

[root@localhost tmp]# . or

orainstRoot.sh orbit-root/

[root@localhost tmp]# . orainstRoot.sh

Creating Oracle Inventory pointer file (/etc/oraInst.loc)

Changing groupname of /opt/oracle/oraInventory to dba.

[root@localhost tmp]# cd /opt/oracle/

doc/ jre/ oraInventory/ oui/ product/

[root@localhost tmp]# cd /opt/oracle/product/9.2.0/

[root@localhost 9.2.0]# . root.sh

Running Oracle9 root.sh script...

\nThe following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /opt/oracle/product/9.2.0

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Copying dbhome to /usr/local/bin ...

Copying oraenv to /usr/local/bin ...

Copying coraenv to /usr/local/bin ...

 

\nCreating /etc/oratab file...

Adding entry to /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

 

 

[oracle@localhost Disk1]$ dbca

/opt/oracle/jre/1.1.8/bin/../lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)

Unable to initialize threads: cannot find class java/lang/Thread

Could not create Java VM

[oracle@localhost Disk1]$ netca

/opt/oracle/jre/1.1.8/bin/../lib/i686/native_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)

Unable to initialize threads: cannot find class java/lang/Thread

Could not create Java VM

 

 

 

[root@localhost 9.2.0]# su - oracle

[oracle@localhost ~]$ cd $ORACLE_HOME

[oracle@localhost 9.2.0]$ ls

Apache classes demo hs javavm JRE md ocommon oracore plsql root.sh sqlplus weboamlib

assistants ctx dm install jdbc jsp mgw ocs4j ord precomp slax syndication wwg

BC4J cwmlite doc inventory jdk ldap network oem_webstage otrace rdbms soap sysman xdk

bin dbs ds jar jlib lib oci olap owm relnotes sqlj ultrasearch

[oracle@localhost 9.2.0]$ mv JRE JRE.bak

[oracle@localhost 9.2.0]$ ls $ORACLE_BASE

doc jre oraInventory oui product

[oracle@localhost 9.2.0]$ ln -s $ORACLE_BASE/jre/1.3.1 $ORACLE_HOME/JRE

[oracle@localhost 9.2.0]$ cd $ORACLE_BASE/jre/1.3.1/bin

[oracle@localhost bin]$ ln -s $ORACLE_BASE/jre/1.3.1/bin/.java_wrapper jre

[oracle@localhost bin]$ cd i386/native_threads

[oracle@localhost native_threads]$ ls

java java_vm keytool policytool rmid rmiregistry tnameserv

[oracle@localhost native_threads]$ ln -s java jre

 

 

Netca:

[oracle@localhost Disk1]$ dbca

/opt/oracle/jre/1.1.8/bin/../lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)

Unable to initialize threads: cannot find class java/lang/Thread

Could not create Java VM

[oracle@localhost Disk1]$ netca

/opt/oracle/jre/1.1.8/bin/../lib/i686/native_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)

Unable to initialize threads: cannot find class java/lang/Thread

Could not create Java VM

[oracle@localhost Disk1]$ netca

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding

Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding

Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding

Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding

Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding

Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type VirtualBinding

Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding

Oracle Net Services Configuration:

Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding

Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding

Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding

Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding

Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding

Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type VirtualBinding

Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding

 

 

 

 

 

Dbca:

[oracle@localhost Disk1]$ dbca

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding

Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding

Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding

Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding

Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding

Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type VirtualBinding

Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding

Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding

Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding

Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding

Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding

Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding

Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type VirtualBinding

Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding

 

 

 

创建成功

建立监听

10 数据库冷备

[oracle@localhost Disk1]$ lsnrctl stop

 

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 17-JAN-2013 12:05:57

 

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))

The command completed successfully

[oracle@localhost Disk1]$ sqlplus /nolog

 

SQL*Plus: Release 9.2.0.4.0 - Production on Thu Jan 17 12:06:03 2013

 

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

 

SQL> conn / as sysdba

Connected.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.4.0 - Production

 

[oracle@localhost /]$ cd ~

[oracle@localhost ~]$ mkdir coldbak

[oracle@localhost ~]$ cd coldbak/

[oracle@localhost coldbak]$ ls

[oracle@localhost coldbak]$ cp -r /opt/ ./

[oracle@localhost coldbak]$ ls

9i opt

[oracle@localhost coldbak]$ mv opt ./9i/

[oracle@localhost coldbak]$ ls

9i

第二部分 9i升级到10g

安装10g到不同目录

只安装软件

opt/oracle/product/10.2.0

[oracle@localhost ~]$ mkdir /opt/oracle/product/10.2.0

 

修改环境变量

[oracle@localhost ~]$ vim .bash_profile

 

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

 

# User specific environment and startup programs

 

PATH=$PATH:$HOME/bin

 

export PATH

export ORACLE_BASE=/opt/oracle

export ORACLE_HOME=/opt/oracle/product/10.2.0

export ORACLE_SID=demo

export ORACLE_TERM=xterm

#export NLS_LANG=american_america.ZHS16GBK;

export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

export PATH=$PATH:$ORACLE_HOME/bin;

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib

export LANG=en_US

".bash_profile" 23L, 644C written

 

安装10g软件图解

[root@localhost ~]# vi /etc/redhat-release

[root@localhost ~]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 4.0 (Tikanga)

[oracle@localhost database_10g_linux_32bit]$ ./runInstaller

Starting Oracle Universal Installer...

 

Checking installer requirements...

 

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2

Passed

 

 

All installer requirements met.

 

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-01-17_12-56-16PM. Please wait ...

 

[root@localhost 9.2.0]# . /opt/oracle/product/10.2.0/root.sh

Running Oracle10 root.sh script...

 

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /opt/oracle/product/10.2.0

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]:

The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]:

The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]:

 

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

 

 

 

 

升级步骤记录

1 启动9.2.0.4,以sysdba身份登陆到sqlplus,进行安装钱的准备,看是否有参数和表空间需要调整

 

 

[oracle@localhost ~]$ vi .bash_profile

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

 

# User specific environment and startup programs

 

PATH=$PATH:$HOME/bin

 

export PATH

export ORACLE_BASE=/opt/oracle

export ORACLE_HOME=/opt/oracle/product/9.2.0

export ORACLE_SID=demo

export ORACLE_TERM=xterm

#export NLS_LANG=american_america.ZHS16GBK;

export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

export PATH=$PATH:$ORACLE_HOME/bin;

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib

export LANG=en_US

".bash_profile" 23L, 643C written

[oracle@localhost ~]$ . .bash_profile

[oracle@localhost ~]$ sqlplus /nolog

 

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 17 13:17:37 2013

 

Copyright (c) 1982, 2005, Oracle. All rights reserved.

 

SQL> conn / as sysdba

Connected to an idle instance.

SQL> startup;

ORACLE instance started.

 

Total System Global Area 236000356 bytes

Fixed Size 451684 bytes

Variable Size 201326592 bytes

Database Buffers 33554432 bytes

Redo Buffers 667648 bytes

Database mounted.

Database opened.

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.4.0 - Production

[oracle@localhost ~]$

 

[oracle@localhost ~]$ . .bash_profile

[oracle@localhost ~]$ which sqlplus

/opt/oracle/product/9.2.0/bin/sqlplus

 

SQL> @/opt/oracle/product/10.2.0/rdbms/admin/utlu102i.sql

Oracle Database 10.2 Upgrade Information Utility 01-17-2013 13:27:17

.

**********************************************************************

Database:

**********************************************************************

--> name: DEMO

--> version: 9.2.0.4.0

--> compatible: 9.2.0.0.0

.

**********************************************************************

Logfiles: [make adjustments in the current environment]

**********************************************************************

--> The existing log files are adequate. No changes are required.

.

**********************************************************************

Tablespaces: [make adjustments in the current environment]

**********************************************************************

--> SYSTEM tablespace is adequate for the upgrade.

.... minimum required size: 541 MB

.... AUTOEXTEND additional space required: 161 MB

--> TEMP tablespace is adequate for the upgrade.

.... minimum required size: 58 MB

.... AUTOEXTEND additional space required: 18 MB

--> CWMLITE tablespace is adequate for the upgrade.

.... minimum required size: 15 MB

--> DRSYS tablespace is adequate for the upgrade.

.... minimum required size: 27 MB

.... AUTOEXTEND additional space required: 7 MB

--> EXAMPLE tablespace is adequate for the upgrade.

.... minimum required size: 150 MB

.... AUTOEXTEND additional space required: 1 MB

--> ODM tablespace is adequate for the upgrade.

.... minimum required size: 10 MB

--> XDB tablespace is adequate for the upgrade.

.... minimum required size: 48 MB

.... AUTOEXTEND additional space required: 3 MB

.

**********************************************************************

Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]

**********************************************************************

WARNING: --> "shared_pool_size" needs to be increased to at least 183314432

WARNING: --> "streams_pool_size" is not currently defined and needs a value of

at least 50331648

WARNING: --> "session_max_open_files" needs to be increased to at least 20

.

**********************************************************************

Deprecated Parameters: [Update Oracle Database 10.2 init.ora or spfile]

**********************************************************************

-- No deprecated parameters found. No changes are required.

.

**********************************************************************

Obsolete Parameters: [Update Oracle Database 10.2 init.ora or spfile]

**********************************************************************

--> "hash_join_enabled"

--> "log_archive_start"

.

**********************************************************************

Components: [The following database components will be upgraded or installed]

**********************************************************************

--> Oracle Catalog Views [upgrade] VALID

--> Oracle Packages and Types [upgrade] VALID

--> JServer JAVA Virtual Machine [upgrade] VALID

...The 'JServer JAVA Virtual Machine' JAccelerator (NCOMP)

...is required to be installed from the 10g Companion CD.

--> Oracle XDK for Java [upgrade] VALID

--> Oracle Java Packages [upgrade] VALID

--> Oracle Text [upgrade] VALID

--> Oracle XML Database [upgrade] VALID

--> Oracle Workspace Manager [upgrade] VALID

--> Oracle Data Mining [upgrade] LOADED

--> OLAP Analytic Workspace [upgrade] LOADED

--> OLAP Catalog [upgrade] VALID

--> Oracle OLAP API [upgrade] LOADED

--> Oracle interMedia [upgrade] VALID

...The 'Oracle interMedia Image Accelerator' is

...required to be installed from the 10g Companion CD.

--> Spatial [upgrade] LOADED

--> Oracle Ultra Search [upgrade] VALID

... To successfully upgrade Ultra Search, install it from

... the 10g Companion CD.

.

**********************************************************************

Miscellaneous Warnings

**********************************************************************

WARNING: --> Deprecated CONNECT role granted to some user/roles.

.... CONNECT role after upgrade has only CREATE SESSION privilege.

WARNING: --> Database contains stale optimizer statistics.

.... Refer to the 10g Upgrade Guide for instructions to update

.... statistics prior to upgrading the database.

.... Component Schemas with stale statistics:

.... SYS

.... CTXSYS

.... XDB

.... WMSYS

.... ODM

.... OLAPSYS

.... ORDSYS

.... MDSYS

.... WKSYS

.

**********************************************************************

SYSAUX Tablespace:

[Create tablespace in the Oracle Database 10.2 environment]

**********************************************************************

--> New "SYSAUX" tablespace

.... minimum required size for database upgrade: 500 MB

.

 

PL/SQL procedure successfully completed.

 

2 拷贝9i的initsid.ora(/opt/oracle/product/9.2.0/dbs/initdemo.ora)文件到/opt/oracle/product/10.2.0/dbs目录下    

SQL> create pfile from spfile;

 

File created.

 

 

 

[oracle@localhost ~]$ cp /opt/oracle/product/9.2.0/dbs/initdemo.ora /opt/oracle/product/10.2.0/dbs/

[oracle@localhost ~]$

 

3 拷贝9i的密码文件orapwora到/opt/oracle/product/10.2.0/dbs目录下

[oracle@localhost ~]$ cp /opt/oracle/product/9.2.0/dbs/orapwdemo /opt/oracle/product/10.2.0/dbs/

 

4 拷贝9i下的netwokr目录到10g下

[oracle@localhost ~]$ cp -r /opt/oracle/product/9.2.0/network/ /opt/oracle/product/10.2.0/network/

 

5 修改initdemo.ora文件

 

[oracle@localhost dbs]$ vi initdemo.ora

*.aq_tm_processes=1

*.background_dump_dest='/opt/oracle/admin/demo/bdump'

*.compatible='9.2.0.0.0'

*.control_files='/opt/oracle/oradata/demo/control01.ctl','/opt/oracle/oradata/demo/control02.ctl','/opt/oracle/oradata/demo/control03.ctl'

*.core_dump_dest='/opt/oracle/admin/demo/cdump'

*.db_block_size=8192

*.db_cache_size=33554432

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='demo'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=demoXDB)'

*.fast_start_mttr_target=300

*.hash_join_enabled=TRUE

*.instance_name='demo'

*.java_pool_size=83886080

*.job_queue_processes=10

*.large_pool_size=16777216

*.log_archive_dest_1='LOCATION=/opt/oracle/oradata/demo/archive'

*.log_archive_format='%t_%s.dbf'

*.log_archive_start=true

*.open_cursors=300

*.pga_aggregate_target=25165824

*.processes=150

*.query_rewrite_enabled='FALSE'

*.remote_login_passwordfile='EXCLUSIVE'

*.shared_pool_size=183314499

*.streams_pool_size=50331668

*.sort_area_size=524288

*.star_transformation_enabled='FALSE'

*.timed_statistics=TRUE

*.undo_management='AUTO'

*.undo_retention=10800

*.undo_tablespace='UNDOTBS1'

*.user_dump_dest='/opt/oracle/admin/demo/udump'

*.session_max_open_files=30

 

6 ,关闭oracle9.2.0.8数据库实例,关闭listener进程,用oracle10g的环境变量以oracle身份登陆到图形界面,以dbua的方式启动数据库的升级

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.4.0 - Production

[oracle@localhost ~]$ lsnrctl stop

 

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 17-JAN-2013 13:39:55

 

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

Linux Error: 111: Connection refused

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

Linux Error: 2: No such file or directory

[oracle@localhost ~]$ lsnrctl status

 

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 17-JAN-2013 13:40:00

 

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

Linux Error: 111: Connection refused

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

Linux Error: 2: No such file or directory

[oracle@localhost ~]$ which lsnrctl

/opt/oracle/product/9.2.0/bin/lsnrctl

 

 

 

更换Oracle的环境变量

[oracle@localhost ~]$ . .bash_profile

[oracle@localhost ~]$ cat .bash_profile

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

 

# User specific environment and startup programs

 

PATH=$PATH:$HOME/bin

 

export PATH

export ORACLE_BASE=/opt/oracle

export ORACLE_HOME=/opt/oracle/product/10.2.0

export ORACLE_SID=demo

export ORACLE_TERM=xterm

#export NLS_LANG=american_america.ZHS16GBK;

export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

export PATH=$ORACLE_HOME/bin:$PATH;

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib

export LANG=en_US

 

 

[oracle@localhost ~]$ which sqlplus

/opt/oracle/product/10.2.0/bin/sqlplus

[oracle@localhost ~]$ which dbua

/opt/oracle/product/10.2.0/bin/dbua

 

 

图形化升级过程

 

 

 

[oracle@localhost ~]$ which sqlplus

/opt/oracle/product/10.2.0/bin/sqlplus

[oracle@localhost ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 17 15:09:41 2013

 

Copyright (c) 1982, 2005, Oracle. All rights reserved.

 

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

 

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

----------------

demo

 

SQL> exit

 

 

7 升级到10.2.0.4

停止数据库和监听

[oracle@localhost ~]$ lsnrctl stop

 

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-JAN-2013 15:10:44

 

Copyright (c) 1991, 2005, Oracle. All rights reserved.

 

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

The command completed successfully

[oracle@localhost ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 17 15:10:51 2013

 

Copyright (c) 1982, 2005, Oracle. All rights reserved.

 

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

 

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

 

复制10.2.0.4的补丁包

[oracle@localhost Disk1]$ ./runInstaller

Starting Oracle Universal Installer...

 

Checking installer requirements...

 

Checking operating system version: must be redhat-3, SuSE-9, SuSE-10, redhat-4, redhat-5, UnitedLinux-1.0, asianux-1, asianux-2 or asianux-3

Passed

 

 

All installer requirements met.

 

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-01-17_03-21-48PM. Please wait ...

 

[root@localhost ~]# . /opt/oracle/product/10.2.0/root.sh

Running Oracle10 root.sh script...

 

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /opt/oracle/product/10.2.0

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying dbhome to /usr/local/bin ...

The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying oraenv to /usr/local/bin ...

The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying coraenv to /usr/local/bin ...

 

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

 

 

 

Dbua升级

 

 

 

 

 

 

 

 

 

 

 

[oracle@localhost Disk1]$ sqlplus / as sysdba

 

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jan 17 16:33:29 2013

 

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

 

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

----------------

demo

 

SQL> select * from v$version;

 

BANNER

----------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod

PL/SQL Release 10.2.0.4.0 - Production

CORE 10.2.0.4.0 Production

TNS for Linux: Version 10.2.0.4.0 - Production

NLSRTL Version 10.2.0.4.0 - Production

 

第三部分 10g升级到11gR2

安装11gR2的软件

 

设置环境变量

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

 

# User specific environment and startup programs

 

PATH=$PATH:$HOME/bin

 

export PATH

export ORACLE_BASE=/opt/oracle

export ORACLE_HOME=/opt/oracle/product/11.2.0

export ORACLE_SID=demo

export ORACLE_TERM=xterm

#export NLS_LANG=american_america.ZHS16GBK;

export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

export PATH=$ORACLE_HOME/bin:$PATH;

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib

export LANG=en_US

".bash_profile" 23L, 644C written

[oracle@localhost ~]$ mkdir /opt/oracle/product/11.2.0

 

 

[oracle@localhost database]$ ls

doc install response rpm runInstaller sshsetup stage welcome.html

[oracle@localhost database]$ ./runInstaller

Starting Oracle Universal Installer...

 

Checking Temp space: must be greater than 80 MB. Actual 13860 MB Passed

Checking swap space: must be greater than 150 MB. Actual 1027 MB Passed

Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-01-17_07-32-41PM. Please wait

 

 

 

 

 

 

 

 

[root@localhost Server]# rpm -ivh libaio-devel-0.3.106-5.i386.rpm

warning: libaio-devel-0.3.106-5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... ########################################### [100%]

1:libaio-devel ########################################### [100%]

[root@localhost Server]# rpm -ivh uni

unifdef-1.171-5.fc6.i386.rpm unix2dos-2.2-26.2.3.el5.i386.rpm unixODBC-devel-2.2.11-7.1.i386.rpm

units-1.85-1.2.2.i386.rpm unixODBC-2.2.11-7.1.i386.rpm unixODBC-kde-2.2.11-7.1.i386.rpm

[root@localhost Server]# rpm -ivh unixODBC-2.2.11-7.1.i386.rpm

warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... ########################################### [100%]

package unixODBC-2.2.11-7.1.i386 is already installed

[root@localhost Server]# rpm -ivh unixODBC-devel-2.2.11-7.1.i386.rpm

warning: unixODBC-devel-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... ########################################### [100%]

1:unixODBC-devel ########################################### [100%]

 

 

 

 

[root@localhost Server]# . /opt/oracle/product/11.2.0/dbhome_1/root.sh

Running Oracle 11g root.sh script...

 

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /opt/oracle/product/11.2.0/dbhome_1

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying dbhome to /usr/local/bin ...

The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying oraenv to /usr/local/bin ...

The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying coraenv to /usr/local/bin ...

 

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

 

 

 

 

 

 

Dbua升级

在10g的环境变量想运行

/opt/oracle/product/11.2.0/dbhome_1/rdbms/admin/utlu112i.sql脚本

获得结果如下

Oracle Database 11.2 Pre-Upgrade Information Tool 01-21-2013 11:00:56

.

**********************************************************************

Database:

**********************************************************************

--> name: DEMO

--> version: 10.2.0.4.0

--> compatible: 9.2.0.0.0

--> blocksize: 8192

--> platform: Linux IA (32-bit)

--> timezone file: V4

.

**********************************************************************

Tablespaces: [make adjustments in the current environment]

**********************************************************************

--> SYSTEM tablespace is adequate for the upgrade.

.... minimum required size: 833 MB

.... AUTOEXTEND additional space required: 233 MB

--> UNDOTBS1 tablespace is adequate for the upgrade.

.... minimum required size: 725 MB

--> TEMP tablespace is adequate for the upgrade.

.... minimum required size: 61 MB

.... AUTOEXTEND additional space required: 21 MB

--> CWMLITE tablespace is adequate for the upgrade.

.... minimum required size: 16 MB

--> DRSYS tablespace is adequate for the upgrade.

.... minimum required size: 11 MB

--> EXAMPLE tablespace is adequate for the upgrade.

.... minimum required size: 153 MB

.... AUTOEXTEND additional space required: 3 MB

--> ODM tablespace is adequate for the upgrade.

.... minimum required size: 10 MB

--> XDB tablespace is adequate for the upgrade.

.... minimum required size: 106 MB

.... AUTOEXTEND additional space required: 58 MB

--> SYSAUX tablespace is adequate for the upgrade.

.... minimum required size: 106 MB

.

**********************************************************************

Flashback: OFF

**********************************************************************

**********************************************************************

Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]

**********************************************************************

WARNING: --> "compatible" must be set to at least 10.1.0

WARNING: --> "shared_pool_size" needs to be increased to at least 298 MB

WARNING: --> "db_cache_size" needs to be increased to at least 50331648 bytes

.

**********************************************************************

Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]

**********************************************************************

-- No renamed parameters found. No changes are required.

.

**********************************************************************

Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]

**********************************************************************

--> background_dump_dest 11.1 DEPRECATED replaced by

"diagnostic_dest"

--> user_dump_dest 11.1 DEPRECATED replaced by

"diagnostic_dest"

--> core_dump_dest 11.1 DEPRECATED replaced by

"diagnostic_dest"

.

**********************************************************************

Components: [The following database components will be upgraded or installed]

**********************************************************************

--> Oracle Catalog Views [upgrade] VALID

--> Oracle Packages and Types [upgrade] VALID

--> JServer JAVA Virtual Machine [upgrade] VALID

--> Oracle XDK for Java [upgrade] VALID

--> Oracle Workspace Manager [upgrade] VALID

--> OLAP Analytic Workspace [upgrade] VALID

--> OLAP Catalog [upgrade] VALID

--> Oracle Text [upgrade] VALID

--> Oracle XML Database [upgrade] VALID

--> Oracle Java Packages [upgrade] VALID

--> Oracle interMedia [upgrade] VALID

--> Spatial [upgrade] VALID

--> Data Mining [upgrade] VALID

--> Oracle Ultra Search [upgrade] INVALID

--> Oracle OLAP API [upgrade] VALID

.

**********************************************************************

Miscellaneous Warnings

**********************************************************************

WARNING: --> Database is using a timezone file older than version 11.

.... After the release migration, it is recommended that DBMS_DST package

.... be used to upgrade the 10.2.0.4.0 database timezone version

.... to the latest version which comes with the new release.

WARNING: --> Database contains schemas with stale optimizer statistics.

.... Refer to the Upgrade Guide for instructions to update

.... schema statistics prior to upgrading the database.

.... Component Schemas with stale statistics:

.... SYS

.... WMSYS

.... OLAPSYS

.... CTXSYS

.... XDB

.... MDSYS

.... WKSYS

WARNING: --> Database contains INVALID objects prior to upgrade.

.... The list of invalid SYS/SYSTEM objects was written to

.... registry$sys_inv_objs.

.... The list of non-SYS/SYSTEM objects was written to

.... registry$nonsys_inv_objs.

.... Use utluiobj.sql after the upgrade to identify any new invalid

.... objects due to the upgrade.

.... USER WKSYS has 4 INVALID objects.

.... USER PUBLIC has 1 INVALID objects.

.... USER SYS has 2 INVALID objects.

WARNING: --> Database contains schemas with objects dependent on network

packages.

.... Refer to the Upgrade Guide for instructions to configure Network ACLs.

WARNING: --> log_archive_format must be updated.

.... As of 10.1, log_archive_format requires a %r format qualifier

.... be present in its format string. Your current setting is:

.... log_archive_format='%t_%s.dbf'.

.... Archive Logging is currently ON, and failure to add the %r to the

.... format string will prevent the upgraded database from starting up.

WARNING:--> recycle bin in use.

.... Your recycle bin turned on.

.... It is REQUIRED

.... that the recycle bin is empty prior to upgrading

.... your database.

.... The command: PURGE DBA_RECYCLEBIN

.... must be executed immediately prior to executing your upgrade.

.

 

PL/SQL procedure successfully completed.

标红部分需要修改

 

修改之前冷备10g数据库

 

user_dump_dest=/opt/oracle/admin/demo/udump[oracle@localhost dbs]$ vi initdemo.ora

 

 

aq_tm_processes=0

background_dump_dest=/opt/oracle/admin/demo/bdump

compatible=10.2.0.4.0

control_files=/opt/oracle/oradata/demo/control01.ctl, /opt/oracle/oradata/demo/control02.ctl, /opt/oracle/oradata/demo/control03.ctl

core_dump_dest=/opt/oracle/admin/demo/cdump

db_block_size=8192

db_cache_size=104857600

db_domain=""

db_file_multiblock_read_count=16

db_name=demo

dispatchers="(PROTOCOL=TCP) (SERVICE=demoXDB)"

fast_start_mttr_target=300

instance_name=demo

java_pool_size=83886080

job_queue_processes=10

large_pool_size=16777216

log_archive_dest_1='LOCATION=/opt/oracle/oradata/demo/archive'

log_archive_format=%r_%t_%s.dbf

nls_length_semantics=BYTE

open_cursors=300

pga_aggregate_target=25165824

processes=150

query_rewrite_enabled=FALSE

remote_login_passwordfile=EXCLUSIVE

resource_manager_plan=""

session_max_open_files=20

shared_pool_size=50790400

sort_area_size=524288

star_transformation_enabled=FALSE

streams_pool_size=50331648

timed_statistics=TRUE

undo_management=AUTO

undo_retention=900

undo_tablespace=UNDOTBS1

user_dump_dest=/opt/oracle/admin/demo/udump

~

~

~

~

~

~

"initdemo.ora" 36L, 1072C written

 

 

[oracle@localhost admin]$ cp listener.ora /opt/oracle/product/11.2.0/dbhome_1/network/admin/

[oracle@localhost admin]$ cp tnsnames.ora /opt/oracle/product/11.2.0/dbhome_1/network/admin/

 

复制 口令文件

和参数文件

[oracle@localhost dbs]$ cp initdemo.ora /opt/oracle/product/11.2.0/dbhome_1/dbs/

[oracle@localhost dbs]$ cp orapwdemo /opt/oracle/product/11.2.0/dbhome_1/dbs/

 

 

 

 

 

 

 

 

 

 

[oracle@localhost ~]$ netca

 

Oracle Net Services Configuration:

Configuring Listener:LISTENER

Listener configuration complete.

Oracle Net Services configuration successful. The exit code is 0

[oracle@localhost ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.1.0 Production on Mon Jan 21 15:46:15 2013

 

Copyright (c) 1982, 2009, Oracle. All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL>

 

 

 

 

 

 

posted @ 2013-01-31 14:16  静水流沙  阅读(838)  评论(1编辑  收藏  举报